sebastizz
asked on
if a cell doesnt match another cell in a different sheet remove the original cell in excel
In the same workbook I have a column (colA) in sheet1 and a column in sheet2 (colA) and the same in sheet 3&4. There is other info in the other columns in each sheet
In the column are reference numbers. I would like to make sure that the same number is in all the sheets. If it isnt, then the entire row should be removed for the sheet that the match is being done from. I will of course be running this on all the sheets so I will eventually end up with the same numbers in the same rows.
As an example:
Sheet 1 Sheet 2 Sheet 3
leftPos JWA leftPos JWB leftPos JWC
100260304 96 100260304 62 100202137 1
100735392 129 100724039 1 100260304 75
100805662 122 100735392 175 100735392 306
So the following should be removed
Sheet 1 100805662 122
Sheet 2 100724039 1
Sheet 3 100202137 1
In the column are reference numbers. I would like to make sure that the same number is in all the sheets. If it isnt, then the entire row should be removed for the sheet that the match is being done from. I will of course be running this on all the sheets so I will eventually end up with the same numbers in the same rows.
As an example:
Sheet 1 Sheet 2 Sheet 3
leftPos JWA leftPos JWB leftPos JWC
100260304 96 100260304 62 100202137 1
100735392 129 100724039 1 100260304 75
100805662 122 100735392 175 100735392 306
So the following should be removed
Sheet 1 100805662 122
Sheet 2 100724039 1
Sheet 3 100202137 1
ASKER
OK. Thanks for the script. At the moment it seems to only output 3 rows into another worksheet which I assume are the non matching rows. Would it help for me to paste an example spreadsheet so you can see how its laid out- see attached. Im not sure if your script has only enabled comparison of a few rows or not. Also should I be called the sheet to make the comparison from something else? Eventually all sheets should compare to all sheets though.
ASKER
Looks like the attachment didn't work so here it is again
JWControlMatchingSpreadsheet.xls
JWControlMatchingSpreadsheet.xls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Super useful answer. Really helpful and thanks for doing it so quickly
Open in new window
RemoveItems.xlsm