I have a big project that I need help with. This will be a macro that is way more advanced then what I can handle so I'm hoping one one the macro experts on this site will grab this up and run with it. I will try to explain this the best I can but I am also attaching the links where you can download my sample
workbooks. I am color coding the cells to help follow what I'm needing but do not need the colors in the
macro. I'm needing a macro that will first import the information from the .CSV file and put it in the correct places on the Commercial Invoice sheet. I need range A2 on sheet mws630 to copy to range M9 on sheet Commercial Invoice with 3 leading zeros. Range C2 on sheet mws630 copied to range B9 on sheet Commercial Invoice.
Here is where it starts to get interesting. I need range E2 on sheet mws630 to copy to range B25 on sheet Commercial Invoice, range I2 on sheet mws630 cpoied to range C25 on sheet Commercial Invoice, range F2 on sheet mws630 copied to range D25 on sheet Commercial Invoice, range G2 on sheet mws630 copied to range D26 on sheet Commercial Invoice, range J2 on sheet mws630 copied to range H25 on sheet Commercial Invoice, and range K2 on sheet mws630 copied to range M25 on sheet Commercial Invoice.Then I need range D27 on sheet Commercial Invoice to read "SCH B:", range D28 on sheet Commercial Invoice to read "ECCN:", and range D29 on sheet Commercial Invoice to read "Country of Origin:". Next, I need the macro to use the value in range D25 on sheet Commercial Invoice and compair it to the list on sheet Borger Tariff Codes in column A, find the matching number. In this example it finds the match in range A3. The copy range E3 to range F27 on sheet Commercial Invoice, copy range F3 to range F28 on sheet Commercial Invoice, and copy range D3 to range F29 on sheet Commercial Invoice. Then skip down a line and starting with range B31 on sheet Commercial invoice, repeat until all the lines in mws630 have been added to the Commercial Invoice sheet.
The Commercial Invoice sheet can hold 5 lines off of mws630 and then needs to skip down to the next sheet if needed. There could be up to 10 sheets depending on the amount of lines in mws630. I also need it to mark each sheet in range K4 as Page 1 of 2, 2 of 2 (this example) or 1 of 4, 2 of 4, ect... just depending on how many lines are added.
After all of the importing of information, I need it to go a couple of cells down after the last entry and
and "Order#" in column D and "DLY#" in column F. Range M9 in column E and Range B9 in column G. Add "Total Goods:" in column J and a couple of rows Down, add "Amount Due:" in column J. Then on the same row, I need column M to get the sum of everything above it (same row as the total goods) and then need column M on the row with "Amount Due:" to match the value for column M beside "Total Good:"
After all of that (as if that wasn't enough), I will need to only print the pages with information added.
If I have one page, I need to print 1 page, If I have 5 pages with info I will need to print all 5, ect...
This example should have 2 pages.
I know this is a huge thing to ask and I hope someone is willing to help me out. The links to the spreadsheets are listed below.
Thanks
THRASHER
https://drive.google.com/file/d/0B1K...it?usp=sharing
https://drive.google.com/file/d/0B1K...it?usp=sharing
Bookmarks