Follow on from last 2 posts
Explanation attempt
Column A of worksheet abc is compared with column A of worksheet def, looking for matches in data. If data in Column A of worksheet def is also found in column A of worksheet abc, then that matched data in column A of worksheet def is deleted
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: abc
Row\Col A B 1 1234 2 5678 3 91011 4 12131415 5 1617181920 6
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: def
Row\Col A 1 1234 2 15678 3 191011 4 112131415 5 16171811920
Column A of worksheet abc is compared with column A of worksheet def, looking for matches in data. If data in Column A of worksheet def is also found in column A of worksheet abc, then that matched data in column A of worksheet def is deleted
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: def (modified)
1234 15678 191011 112131415 16171811920
The remain data in worksheet def is now compared with column A of worksheet Fake Data.
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Fake Data
Row\Col A B 1 115678 2 191011 3 1112131415 4 1.16172E+11 5
If data in Column A of worksheet Fake Data is also found in column A of the modified worksheet def, then that matched data in column A of worksheet Fake Data is deleted
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Fake Data (modified)
115678 191011 1112131415 1.16172E+11
The remaining data in column A of modified worksheet Fake Data is now compared with column A of worksheet Completed
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Completed
Row\Col A B 1 115678 2
If there is a match in data in columns A of worksheet Completed, and column A of worksheet Fake Data, then delete that matched data from worksheet Fake Data
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Fake Data (modified)
115678 191011 1112131415 1.16172E+11
If there is now any remaining data in column A of modified Fake Data, then that data is added to column A of missing data , ( in the given example, VBA Before.xls , A1 in missing data sheet already had data
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Missing data
Row\Col A 1 11111158 2
so we put the result below that:
_____ Workbook: VBA worked excample.xls ( Using Excel 2007 32 bit )
Worksheet: Missing data (final)
Row\Col A B 1 11111158 2 1112131415 3 1.16172E+11 4




Reply With Quote
Bookmarks