I thought this would be easy but ive hit a brick wall and am struggling to get my head round what is needed.
I need to lookup the last value in the Sold Tab - Sold Table and then Search tables1,2 & 3 to see if value is found - If so delete this row.
Then return to the Sold Table and delete the variable just used.
I can't figure out how to loop it so it runs as many times as there are values in the sold table, so that all matching variables are deleted from Tables 1,2 & 3 - i.e if 3 variables run 3 times etc
This is as far as i have got so far, can anyone help please?
I need to lookup the last value in the Sold Tab - Sold Table and then Search tables1,2 & 3 to see if value is found - If so delete this row.
Then return to the Sold Table and delete the variable just used.
I can't figure out how to loop it so it runs as many times as there are values in the sold table, so that all matching variables are deleted from Tables 1,2 & 3 - i.e if 3 variables run 3 times etc
This is as far as i have got so far, can anyone help please?
VBA Code:
Sub AAAA()
Dim Share As Range
Dim c As Range
Dim ws As Worksheet
Worksheets("Sold").Activate
Cells.Find(What:="Sold Share").End(xlDown).Select
If ActiveCell = "" Then Exit Sub
If ActiveCell <> "" Then Selection.Select
Set Share = ActiveCell
Worksheets("1").Activate
For Each c In Range("Table2")
If c = Share Then c.EntireRow.Delete
Next c
Worksheets("2").Activate
For Each c In Range("Table3")
If c = Share Then c.EntireRow.Delete
Next c
Worksheets("3").Activate
For Each c In Range("Table4")
If c = Share Then c.EntireRow.Delete
Next c
Worksheets("Sold").Activate
For Each c In Range("Sold")
If c = Share Then c.EntireRow.Delete
Next c
End
End Sub