I've been away from this for awhile. Seems straightforward, but I just can't get it. I have a single worksheet in a workbook named "export.xls" It looks like this.
[TABLE="width: 492"]
<colgroup><col span="5"><col><col></colgroup><tbody>[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][TABLE="width: 588"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]SUPC[/TD]
[TD]Pack[/TD]
[TD]Size[/TD]
[TD]Brand[/TD]
[TD]Desc[/TD]
[TD]Cat[/TD]
[TD]Case $[/TD]
[/TR]
[TR]
[TD="align: right"]8965881[/TD]
[TD="align: right"]9[/TD]
[TD].5 GAL[/TD]
[TD]WHLFARM[/TD]
[TD]BUTTERMILK FRESH 1%[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]22.58[/TD]
[/TR]
[TR]
[TD="align: right"]6697890[/TD]
[TD="align: right"]4[/TD]
[TD]5 LB[/TD]
[TD]BBRLCLS[/TD]
[TD]CHEESE AMER YEL 160 SLI
[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]43.99[/TD]
[/TR]
[TR]
[TD="align: right"]2599793[/TD]
[TD="align: right"]1[/TD]
[TD]10 LB[/TD]
[TD]BBRLIMP[/TD]
[TD]CHEESE CHDR MILD YEL PRNT[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]25.69[/TD]
[/TR]
[TR]
[TD="align: right"]7950876[/TD]
[TD="align: right"]1[/TD]
[TD]15 LB[/TD]
[TD]SYS REL[/TD]
[TD]BACON LAYFLAT 18/22 HRTY SMOKE[/TD]
[TD]Meats[/TD]
[TD="align: right"]54.5[/TD]
[/TR]
[TR]
[TD="align: right"]6748760[/TD]
[TD="align: right"]2[/TD]
[TD]7-8#AV[/TD]
[TD]HLSHIRE[/TD]
[TD]BEEF CORNED BRSKT CH CKD FZ[/TD]
[TD]Meats[/TD]
[TD="align: right"]2.3337[/TD]
[/TR]
[TR]
[TD="align: right"]1044445[/TD]
[TD="align: right"]40[/TD]
[TD]4 OZ[/TD]
[TD]SYS IMP[/TD]
[TD]BEEF FRITTER CHKN CNTRY FRIED[/TD]
[TD]Meats[/TD]
[TD="align: right"]46.29[/TD]
[/TR]
[TR]
[TD="align: right"]793434[/TD]
[TD="align: right"]1[/TD]
[TD]10 LB[/TD]
[TD]ICYBAY[/TD]
[TD]FLOUNDER FILLET FZN 4 OZ[/TD]
[TD]Seafood[/TD]
[TD="align: right"]43.68[/TD]
[/TR]
[TR]
[TD="align: right"]6731515[/TD]
[TD="align: right"]4[/TD]
[TD]2.5 LB[/TD]
[TD]PORTBTY[/TD]
[TD]SHRIMP WHT P&D TLON 26/30[/TD]
[TD]Seafood[/TD]
[TD="align: right"]93.07[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
I have a second workbook (inventory.xls) setup with worksheets named to match the column labeled "CAT". I need help with a macro that will import the data from the closed workbook (export.xls) and copy all rows into the open workbook, placing each row into the appropriate worksheet matching the CAT column.
Additionally I would like to scan for duplicate (SUPC) values as it pastes the row and do the following;
1. If the item already exists, only copy the (CASE $) field and highlite it somehow as a new price
2. If the item does not exist, copy the entire row to the bottom row
Any help you all can give me would be great.
DT
[TABLE="width: 492"]
<colgroup><col span="5"><col><col></colgroup><tbody>[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][TABLE="width: 588"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]SUPC[/TD]
[TD]Pack[/TD]
[TD]Size[/TD]
[TD]Brand[/TD]
[TD]Desc[/TD]
[TD]Cat[/TD]
[TD]Case $[/TD]
[/TR]
[TR]
[TD="align: right"]8965881[/TD]
[TD="align: right"]9[/TD]
[TD].5 GAL[/TD]
[TD]WHLFARM[/TD]
[TD]BUTTERMILK FRESH 1%[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]22.58[/TD]
[/TR]
[TR]
[TD="align: right"]6697890[/TD]
[TD="align: right"]4[/TD]
[TD]5 LB[/TD]
[TD]BBRLCLS[/TD]
[TD]CHEESE AMER YEL 160 SLI
[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]43.99[/TD]
[/TR]
[TR]
[TD="align: right"]2599793[/TD]
[TD="align: right"]1[/TD]
[TD]10 LB[/TD]
[TD]BBRLIMP[/TD]
[TD]CHEESE CHDR MILD YEL PRNT[/TD]
[TD]Dairy Products[/TD]
[TD="align: right"]25.69[/TD]
[/TR]
[TR]
[TD="align: right"]7950876[/TD]
[TD="align: right"]1[/TD]
[TD]15 LB[/TD]
[TD]SYS REL[/TD]
[TD]BACON LAYFLAT 18/22 HRTY SMOKE[/TD]
[TD]Meats[/TD]
[TD="align: right"]54.5[/TD]
[/TR]
[TR]
[TD="align: right"]6748760[/TD]
[TD="align: right"]2[/TD]
[TD]7-8#AV[/TD]
[TD]HLSHIRE[/TD]
[TD]BEEF CORNED BRSKT CH CKD FZ[/TD]
[TD]Meats[/TD]
[TD="align: right"]2.3337[/TD]
[/TR]
[TR]
[TD="align: right"]1044445[/TD]
[TD="align: right"]40[/TD]
[TD]4 OZ[/TD]
[TD]SYS IMP[/TD]
[TD]BEEF FRITTER CHKN CNTRY FRIED[/TD]
[TD]Meats[/TD]
[TD="align: right"]46.29[/TD]
[/TR]
[TR]
[TD="align: right"]793434[/TD]
[TD="align: right"]1[/TD]
[TD]10 LB[/TD]
[TD]ICYBAY[/TD]
[TD]FLOUNDER FILLET FZN 4 OZ[/TD]
[TD]Seafood[/TD]
[TD="align: right"]43.68[/TD]
[/TR]
[TR]
[TD="align: right"]6731515[/TD]
[TD="align: right"]4[/TD]
[TD]2.5 LB[/TD]
[TD]PORTBTY[/TD]
[TD]SHRIMP WHT P&D TLON 26/30[/TD]
[TD]Seafood[/TD]
[TD="align: right"]93.07[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
I have a second workbook (inventory.xls) setup with worksheets named to match the column labeled "CAT". I need help with a macro that will import the data from the closed workbook (export.xls) and copy all rows into the open workbook, placing each row into the appropriate worksheet matching the CAT column.
Additionally I would like to scan for duplicate (SUPC) values as it pastes the row and do the following;
1. If the item already exists, only copy the (CASE $) field and highlite it somehow as a new price
2. If the item does not exist, copy the entire row to the bottom row
Any help you all can give me would be great.
DT