I have a complex macro in my mind that I want to build, but such little macro experience that I just can't build it alone.
One workbook.
Three sheets.
Several hundred rows, but only columns A through G.
Sheet1 "Old"
Sheet 2 "New"
Sheet 3 "Final"
Sheet 4 "Report"
Each workbook has the exact same headers across Columns A through G
Each row is a unique product. Column B is the barcode that will never change for the product, but everything else could change.
The rows could all be out of order between Old and New.
I need a Macro that will do several things.
Compare Old and New based on Column B, the barcode.
If there was no change in Column A of that same row, then display from Old.
If there was a change in Column A, display the New and make the text orange.
Compare Old and New based on Column B, the barcode.
If there was no change in Column C-G, then display from Old.
If there was a change in Column C, Column D, Column E, column F, or Column G, then display new and change text color to Green.
Compare Old and New based on Column B, the barcode.
If there are any values in New that didn't exist in Old, then copy from New and make the text in columns A through G Blue.
The end result should then be identical to New, but with values that were changed displaying in certain colors, and values that are new displaying in other colors. (The order of the rows does matter and needs to be the same in my result as in the New.)
Then, on Sheet4 ("Report"), I need a comparison of the changes between old and new with the following info:
Changes from Old to New in Column A, excluding brand new entries.
Changes from Old to New in Column C, excluding brand new entries.
Changes from Old to New in Column D, excluding brand new entries.
Changes from Old to New in Column E, excluding brand new entries.
Changes from Old to New in Column F, excluding brand new entries.
Changes from Old to New in Column G, excluding brand new entries.
Then finally, how many brand new entries are there in the New.
Those results could either be a dialogue box pop-up, or could produce on a separate worksheet. I just need to log them for another external system.
For me, this seems like a HUGE ask, but maybe it's child's play for some other folks... if someone knows how to make this happen I'd be so super appreciative! Right now, I have to do this manually, several times a day, and it takes so much of my time to manually compare things, filter the correct results, apply the color coding, etc. This would save me hours upon hours. Thank you in advance!!!
Samples of the kind of data I'll have are below, in case my explanations were confusing...
Sheet1("Old") - I will input this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Gidget[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]hard[/TD]
[TD]top[/TD]
[TD]green[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Stuff[/TD]
[TD]635[/TD]
[TD]low[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2("New") - I will input this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Gidgets[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]aqua[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]StuffAndThing[/TD]
[TD]635[/TD]
[TD]lower[/TD]
[TD]mixed[/TD]
[TD]left[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
[TR]
[TD]DooDad[/TD]
[TD]632[/TD]
[TD]low[/TD]
[TD]lower[/TD]
[TD]mix[/TD]
[TD]yellow[/TD]
[TD]yellow[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
</tbody>[/TABLE]
Sheet3("Final") - Macro will create this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Gidgets[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]aqua[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]StuffAndThing[/TD]
[TD]635[/TD]
[TD]lower[/TD]
[TD]mixed[/TD]
[TD]left[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
[TR]
[TD]DooDad[/TD]
[TD]632[/TD]
[TD]low[/TD]
[TD]lower[/TD]
[TD]mix[/TD]
[TD]yellow[/TD]
[TD]yellow[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
</tbody>[/TABLE]
Sheet4("Report") - Macro will create this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name Changes[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Value Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Type Changes[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Location Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Attribute A Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Attribute B Changes[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]New Products[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]
One workbook.
Three sheets.
Several hundred rows, but only columns A through G.
Sheet1 "Old"
Sheet 2 "New"
Sheet 3 "Final"
Sheet 4 "Report"
Each workbook has the exact same headers across Columns A through G
Each row is a unique product. Column B is the barcode that will never change for the product, but everything else could change.
The rows could all be out of order between Old and New.
I need a Macro that will do several things.
Compare Old and New based on Column B, the barcode.
If there was no change in Column A of that same row, then display from Old.
If there was a change in Column A, display the New and make the text orange.
Compare Old and New based on Column B, the barcode.
If there was no change in Column C-G, then display from Old.
If there was a change in Column C, Column D, Column E, column F, or Column G, then display new and change text color to Green.
Compare Old and New based on Column B, the barcode.
If there are any values in New that didn't exist in Old, then copy from New and make the text in columns A through G Blue.
The end result should then be identical to New, but with values that were changed displaying in certain colors, and values that are new displaying in other colors. (The order of the rows does matter and needs to be the same in my result as in the New.)
Then, on Sheet4 ("Report"), I need a comparison of the changes between old and new with the following info:
Changes from Old to New in Column A, excluding brand new entries.
Changes from Old to New in Column C, excluding brand new entries.
Changes from Old to New in Column D, excluding brand new entries.
Changes from Old to New in Column E, excluding brand new entries.
Changes from Old to New in Column F, excluding brand new entries.
Changes from Old to New in Column G, excluding brand new entries.
Then finally, how many brand new entries are there in the New.
Those results could either be a dialogue box pop-up, or could produce on a separate worksheet. I just need to log them for another external system.
For me, this seems like a HUGE ask, but maybe it's child's play for some other folks... if someone knows how to make this happen I'd be so super appreciative! Right now, I have to do this manually, several times a day, and it takes so much of my time to manually compare things, filter the correct results, apply the color coding, etc. This would save me hours upon hours. Thank you in advance!!!
Samples of the kind of data I'll have are below, in case my explanations were confusing...
Sheet1("Old") - I will input this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Gidget[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]hard[/TD]
[TD]top[/TD]
[TD]green[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Stuff[/TD]
[TD]635[/TD]
[TD]low[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2("New") - I will input this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Gidgets[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]aqua[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]StuffAndThing[/TD]
[TD]635[/TD]
[TD]lower[/TD]
[TD]mixed[/TD]
[TD]left[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
[TR]
[TD]DooDad[/TD]
[TD]632[/TD]
[TD]low[/TD]
[TD]lower[/TD]
[TD]mix[/TD]
[TD]yellow[/TD]
[TD]yellow[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
</tbody>[/TABLE]
Sheet3("Final") - Macro will create this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Barcode[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[TD]Location[/TD]
[TD]Attribute A[/TD]
[TD]Attribute B[/TD]
[/TR]
[TR]
[TD]Gidgets[/TD]
[TD]254[/TD]
[TD]low[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]aqua[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]Thing[/TD]
[TD]555[/TD]
[TD]mid[/TD]
[TD]mix[/TD]
[TD]bottom[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
[TR]
[TD]StuffAndThing[/TD]
[TD]635[/TD]
[TD]lower[/TD]
[TD]mixed[/TD]
[TD]left[/TD]
[TD]yellow[/TD]
[TD]blue[/TD]
[/TR]
[TR]
[TD]DooDad[/TD]
[TD]632[/TD]
[TD]low[/TD]
[TD]lower[/TD]
[TD]mix[/TD]
[TD]yellow[/TD]
[TD]yellow[/TD]
[/TR]
[TR]
[TD]Widget[/TD]
[TD]123[/TD]
[TD]high[/TD]
[TD]soft[/TD]
[TD]top[/TD]
[TD]blue[/TD]
[TD]green[/TD]
[/TR]
</tbody>[/TABLE]
Sheet4("Report") - Macro will create this data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name Changes[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Value Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Type Changes[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Location Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Attribute A Changes[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Attribute B Changes[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]New Products[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]