Hi,
I am trying to create a spreadsheet that uses one Master sheet (called Master), and then populates other worksheets with the data from that main sheet. I want to use Column C 'Business Owner' as the data that determines which subsheet that row goes into. So, if I enter 'David' into Column C, I want all data from that row on the Master sheet to copy into the worksheet called 'David', and same for 'Veronica', 'Celeste' etc. This is a working document that will be updated by multiple users, so if any updates are made to the rows at any time, I want all of those updates to copy across to the corresponding subsheet whenever they are made. I'm currently using the below code, which works to some degree; it copies the row to the correct sheet when I enter a value in row C, but if I update the row in any other column, the updates don't copy across. Also, if I re-confirm the name in Column C, it adds a duplicate line in David's worksheet, rather than overwrite the changes.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("C:C")) Is Nothing Then Exit Sub
If Target.Value = "David" Then
Range(Range("A" & Target.Row), Range("AU" & Target.Row)).Copy _
Sheets("David").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
I'm very new to Macros so any help would be much appreciated!
Many thanks,
Hayley
Bookmarks