Hello all,
I am trying to write a VBA macro that will compare column D in Worksheets("Current") to column B in Worksheets("Previous").
Few things to note:
1. column B changes dynamically. For example, the name "Zach93" may exist in cell B4 in "Current" worksheet but exists in cell B7 in "Previous" worksheet. So the VBA code I'm trying to write will just ignore if a match is found.
2. There is also contents in Column A,C,D that can be ignored. I just want to compare Column B.
3. If a match is found in Column B between the 2 spreadsheets, ignore it. If a value exists in "Current" worksheet, highlight cell red. If a value exists in "Previous" worksheet, highlight cell green.
4. The spreadsheets are in the same workbook
5. There will never be a duplicate value in Column C in 1 worksheet. For example, in "Current" there will be either 1 cell containing Zach93 or 0 (never 2 or more cells).
I've tried a few things like comparing the whole spreadsheet instead of just the column but this doesn't work (as it checks cells 1:1 and if it's different, highlights it, which results in most the spreadsheet just being highlighted)
This is office 365. Let me know if I can provide any more details
The data would look something like this
I am trying to write a VBA macro that will compare column D in Worksheets("Current") to column B in Worksheets("Previous").
Few things to note:
1. column B changes dynamically. For example, the name "Zach93" may exist in cell B4 in "Current" worksheet but exists in cell B7 in "Previous" worksheet. So the VBA code I'm trying to write will just ignore if a match is found.
2. There is also contents in Column A,C,D that can be ignored. I just want to compare Column B.
3. If a match is found in Column B between the 2 spreadsheets, ignore it. If a value exists in "Current" worksheet, highlight cell red. If a value exists in "Previous" worksheet, highlight cell green.
4. The spreadsheets are in the same workbook
5. There will never be a duplicate value in Column C in 1 worksheet. For example, in "Current" there will be either 1 cell containing Zach93 or 0 (never 2 or more cells).
I've tried a few things like comparing the whole spreadsheet instead of just the column but this doesn't work (as it checks cells 1:1 and if it's different, highlights it, which results in most the spreadsheet just being highlighted)
This is office 365. Let me know if I can provide any more details
The data would look something like this