+ Reply to Thread
Results 1 to 9 of 9

Problem with getting all the information I need imported correctly

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    28

    Problem with getting all the information I need imported correctly

    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
    Last edited by THRASHER69; 03-27-2014 at 03:10 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Huge Import Project

    The links to your Workbooks don't work.. you should attach your csv files as well..

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Huge Import Project

    Your thread does not comply with Forum Rule No. 1.


    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

  4. #4
    Registered User
    Join Date
    07-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Huge Import Project

    Quote Originally Posted by apo View Post
    The links to your Workbooks don't work.. you should attach your csv files as well..
    My bad. Not sure why the links were not working. They should be good now. As far as the .CSV file, I actually saved it as excel spreadsheet. It is the 2nd link.

    Thank you for taking the time to take a look!

  5. #5
    Registered User
    Join Date
    07-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Huge Import Project

    Quote Originally Posted by JOHN H. DAVIS View Post
    Your thread does not comply with Forum Rule No. 1.


    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    Sorry about that. I changed the title

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Problem with getting all the information I need imported correctly

    Am i missing something...? there is no sheet called mws630.. and the data you talk about that should be on that sheet doesn't exist in the other sheets you have shown..

    I've got a feeling that your task is probably not overly difficult.. but, no offence intended.. your description is confusing.

    For the best chance of help.. its always best to attach a sample file that is relevant to your description. Also.. attach another sheet/workbook that shows EXACTLY how you want it to look once the macro is run.

    If part of your solution involves importing form a csv file.. attach a csv file.

    Quite often.. if a post is difficult to understand easily and quickly.. it will just be bypassed by the members who could otherwise help you.

  7. #7
    Registered User
    Join Date
    07-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Problem with getting all the information I need imported correctly

    no offence taken. my bad again. the secong link was to the wrong file. it is fixed now and is to the .csv file I am talking about in the post. I hope that helps clear things up.

    THRASHER

  8. #8
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Problem with getting all the information I need imported correctly

    ok.. here's a start..

    Click the button... browse for your mws630.csv.xlsx file and open it..

    The data in it will be copied to a Temp sheet and then the Invoice will be filled in from that..

    Still left to do is Subtotals etc.. see if you can progress it.. if not.. I will add some more tomorrow.. (or someone else will maybe give a better solution)..


    Please Login or Register  to view this content.
    Code is not the most elegant.. but does the job i think..
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-05-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Problem with getting all the information I need imported correctly

    Thank you very much apo. I really appreciate the help. I'll see how far I can get. I'm still pretty new to this but love to learn

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import data into excel from MS Project
    By egavasrg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2011, 05:10 PM
  2. [SOLVED] Huge file import is truncated
    By Jo in forum Excel General
    Replies: 4
    Last Post: 07-19-2006, 02:35 PM
  3. Import only certain rows of a huge text file
    By AriBari in forum Excel General
    Replies: 4
    Last Post: 07-11-2005, 01:54 PM
  4. How do I import MS Project data into Excel?
    By mk in forum Excel General
    Replies: 0
    Last Post: 03-16-2005, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1