Excel solution
Closed
eexpert
Posts
2
Registration date
Friday 7 June 2013
Status
Member
Last seen
28 June 2013
-
7 Jun 2013 à 08:51
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 10 Jun 2013 à 11:52
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 10 Jun 2013 à 11:52
Related:
- Excel solution
- Excel mod apk for pc - Download - Spreadsheets
- Driverpack solution download - Download - Cleaning and optimization
- Kernel for excel repair - Download - Backup and recovery
- Arrow keys not working in excel - Guide
- Vat calculation excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
10 Jun 2013 à 11:52
10 Jun 2013 à 11:52
Hi Eexpert,
Here you go:
Please implement code by right-clicking the sheets' tab and pasting the code in the big white field.
The code will only run when something is entered (not when something is removed) in column H.
If the city doesn't have it's own sheet yet, a message will display.
Make sure column A contains data when entering city in the respective row. (let me know if this is an issue)
Hope you like.
Best regards,
Trowa
Here you go:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("H")) Is Nothing Or Target.Value = vbNullString Then Exit Sub
On Error GoTo Message
Target.EntireRow.Copy Sheets(Target.Value).Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Exit Sub
Message:
MsgBox ("Please check if you made a sheet named after this city or" & Chr(10) & "for typo's and try again.")
End Sub
Please implement code by right-clicking the sheets' tab and pasting the code in the big white field.
The code will only run when something is entered (not when something is removed) in column H.
If the city doesn't have it's own sheet yet, a message will display.
Make sure column A contains data when entering city in the respective row. (let me know if this is an issue)
Hope you like.
Best regards,
Trowa