Hello,
I need some help with this problem. I have a spreadsheet with 10K to 15K invoices. For each invoice, I have the number of cartons and packs sold. I also have all the invoices and the stamps sold. I pull this info with a SQL script from out tables. If I was better at SQL, maybe I could get it all together but that isn't working either.
I need to compare the 2 ranges and if there are stamps on a matching invoice, I need to put that number in the stamps column on the first sheet.
Doc Type Doc NumberDate Cartons Packs Stamps Customer # State Doc Type Doc Number Date Stamps
Invoice 1001 1/31/2008 30 300 13952 MS Invoice 1001 1/31/2008 30
Invoice 1002 1/31/2008 164 1640 13471 MS Invoice 1002 1/31/2008 164
Invoice 1003 1/31/2008 44 440 15493 KY Invoice 1003 1/31/2008 44
Invoice 1004 1/31/2008 80 800 15493 KY Invoice 1004 1/31/2008 80
Invoice 1005 1/31/2008 176 1760 10147 MS Invoice 1005 1/31/2008 176
Invoice 1006 1/31/2008 40 400 10147 MS Invoice 1006 1/31/2008 40
Invoice 1007 1/31/2008 31 310 10321 MS Invoice 1007 1/31/2008 31
Invoice 1008 1/31/2008 30 300 13952 MS Invoice 1008 1/31/2008 30
Invoice 1009 1/31/2008 180 1800 10408 MS Invoice 1009 1/31/2008 180
Invoice 1010 1/31/2008 71 710 15048 MS Invoice 1010 1/31/2008 71
Invoice 1011 1/31/2008 120 1200 13464 MS Invoice 1011 1/31/2008 120
Invoice 1012 1/31/2008 21 170 14557 MS Invoice 1012 1/31/2008 21
Invoice 1013 1/31/2008 30 300 10926 MS Invoice 1013 1/31/2008 30
Invoice 1014 1/31/2008 29 290 13117 KY Invoice 1014 1/31/2008 29
Invoice 1015 1/31/2008 8 80 12904 NE Invoice 1015 1/31/2008 8
Invoice 1016 1/31/2008 17 170 11068 NE Invoice 1016 1/31/2008 17
Invoice 1017 1/31/2008 8 80 12065 NE Invoice 1017 1/31/2008 8
Invoice 1018 1/31/2008 29 290 14591 NE Invoice 1018 1/31/2008 29
Invoice 1019 1/31/2008 35 350 10371 KY Invoice 1019 1/31/2008 35
Invoice 1020 1/31/2008 22 130 14864 NE Invoice 1020 1/31/2008 22
I know it looks like it should be a simple =M2 since the first 20 entries have both cartons and stamps but there are <7000 rows in the stamps and over 12000 rows in the cartons and pack. I have attached the spreadsheet here for you to see.
Thanks for any and all help!
2008.xlsx
Bookmarks