Hi all,
I have 3 base columns of data to compare against 3 other columns of data, and i want to highlight the differences between them. Problem is, the 3 columns to check against, might not be in sequence with the 3 base columns.
Example as below:
<tbody>
</tbody>
The first 3 columns (in black), are the base columns and are correct. The next 3 columns (in red), could have errors in any of the 3 columns. I want to be able to spot the errors. The ContainerNo in Column 3 will be fixed and unique, while POL & POD can be duplicates.
The ideal outcome i want is as below (errors to be highlighted - blue in this example), while correct to remain unchanged:
<tbody>
</tbody>
My thinking is that the formula will be based on Column 3 (ContainerNo), checking against Column 6 (ContainerNo), if match, then Check Column 1 against Column 4, and Column 2 against Column 5. If Column 6 (ContainerNo) does not match with Column 3 (ContainerNo), to highlight that particular ContainerNo in Column 6. (AKA ContainerNo is unique).
Would need the solution (and explanation) in VBA, as the macro will be stored in a worksheet to be used by a department.
Hope the above is clear enough.
Appreciate any help!!
Cheers
I have 3 base columns of data to compare against 3 other columns of data, and i want to highlight the differences between them. Problem is, the 3 columns to check against, might not be in sequence with the 3 base columns.
Example as below:
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
POL | POD | ContainerNo | POL | POD | ContainerNo |
PGLAE | ZACPT | TRHU3305091 | PGMTK | AEJEA | XAAB5961250 |
PGLAE | MYPGU | DRYU2142162 | PGLAE | BDCGP | TRHU3305091 |
PGLAE | IDSUB | BSIU2922939 | PGLAE | AEJEA | DRYU2142162 |
PGLAE | AEJEA | XAAB5961250 | PGLAE | IDSUB | BSIU2922939 |
<tbody>
</tbody>
The first 3 columns (in black), are the base columns and are correct. The next 3 columns (in red), could have errors in any of the 3 columns. I want to be able to spot the errors. The ContainerNo in Column 3 will be fixed and unique, while POL & POD can be duplicates.
The ideal outcome i want is as below (errors to be highlighted - blue in this example), while correct to remain unchanged:
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
POL | POD | ContainerNo | POL | POD | ContainerNo |
PGLAE | ZACPT | TRHU3305091 | PGMTK | AEJEA | XAAB5961250 |
PGLAE | MYPGU | DRYU2142162 | PGLAE | BDCGP | TRHU3305091 |
PGLAE | IDSUB | BSIU2922939 | PGLAE | AEJEA | DRYU2142162 |
PGLAE | AEJEA | XAAB5961250 | PGLAE | IDSUB | BSIU2922939 |
<tbody>
</tbody>
My thinking is that the formula will be based on Column 3 (ContainerNo), checking against Column 6 (ContainerNo), if match, then Check Column 1 against Column 4, and Column 2 against Column 5. If Column 6 (ContainerNo) does not match with Column 3 (ContainerNo), to highlight that particular ContainerNo in Column 6. (AKA ContainerNo is unique).
Would need the solution (and explanation) in VBA, as the macro will be stored in a worksheet to be used by a department.
Hope the above is clear enough.
Appreciate any help!!
Cheers