Please could someone tell me how to do this in VBA.
I have a workbook "DataStorage" which has a worksheet named "Works".
It contains thousands of rows of data starting at row 3.
I am using a workbook "Prep Workbook" which contains a worksheet named "Temp Works".
Starting for cell "C3" i need to select all reference numbers in the column starting at "C3" to an undefined number of rows down.
I need to loop through the range and check on workbook "DataStorage", worksheet named "Works" for the existence, in the same column (starting at column "C3"), of the value in the "Prep Workbook", worksheet named "Temp Works".
If there is a match i need to delete the entire row containing the same value on workbook "DataStorage", worksheet named "Works".
Eg.
Workbook "Prep Workbook", Worksheet "Temp Works"
C
1 02345678
2 78635480
3 93624454
4 03740375
Workbook "Data Storage", Worksheet "Works"
Before running needed macro:
C
1 02345678
2 74935243
3 86753428
3 78635480
4 93624454
5 99028725
6 01017263
7 03740375
After running needed macro:
C
1 74935243
2 86753428
3 99028725
4 01017263
All values are text NOT numbers. The data here is an example and the data will never be the same value.
Thanks in advance.
I have a workbook "DataStorage" which has a worksheet named "Works".
It contains thousands of rows of data starting at row 3.
I am using a workbook "Prep Workbook" which contains a worksheet named "Temp Works".
Starting for cell "C3" i need to select all reference numbers in the column starting at "C3" to an undefined number of rows down.
I need to loop through the range and check on workbook "DataStorage", worksheet named "Works" for the existence, in the same column (starting at column "C3"), of the value in the "Prep Workbook", worksheet named "Temp Works".
If there is a match i need to delete the entire row containing the same value on workbook "DataStorage", worksheet named "Works".
Eg.
Workbook "Prep Workbook", Worksheet "Temp Works"
C
1 02345678
2 78635480
3 93624454
4 03740375
Workbook "Data Storage", Worksheet "Works"
Before running needed macro:
C
1 02345678
2 74935243
3 86753428
3 78635480
4 93624454
5 99028725
6 01017263
7 03740375
After running needed macro:
C
1 74935243
2 86753428
3 99028725
4 01017263
All values are text NOT numbers. The data here is an example and the data will never be the same value.
Thanks in advance.