+ Reply to Thread
Results 1 to 4 of 4

Help with Import function, loop?

  1. #1
    Registered User
    Join Date
    04-02-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    52

    Help with Import function, loop?

    Hi everyone!

    My work uses a excel spreadsheet to monitor our progress on the vehicles in the garage.

    We are a big company and therefor we working in different cities but everyone is using the same spreadsheet.

    When I make some changes on the sheet I have to ask everyone to email me there workbook so I can manually copy and paste the values to the new one and then send it back to them.
    This usually takes alot of time and therefor I tought it would be a good idéa to add an import feature.

    First I made it really easy for me and just made a code that copied all the sheets and removed the old ones.
    But doing this means if i choose to add new content (that will be shown as a header in a listbox) then this will be removed once the import has been made.

    So I made a small code, just to see if it worked, to copy each column instead and then paste and therefor not erasing any new content. But it's over 100 columns (several sheets) and the code will be gigantic if I just copy this and change the values.

    What I'm looking for is some help to make this more dynamic. And search for criterias (in the old workbook) in the top row of each column and then copy the rows below to a column with the same criteria (in the new workbook).

    I tried using the Find feature with no good results.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Help with Import function, loop?

    Specifically, where are you looking for help?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    04-02-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Help with Import function, loop?

    Hi mikeTRON

    I found a solution to my problem. So it's working as intended now. I have a hidden sheet where I added the search criterias (for exampel, Brand, Number, Model). The macro is supposed to have two functions. This on, as posted below, replace everything with the new information.

    The other function, is supposed to add the information on the last used row instead of replacing everything.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-02-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Help with Import function, loop?

    Also, some declaring of variables are missing and thats because they where changed to public.

    EDIT: Noticed I forgot to write what I needed help with. How can i change the current code so it's pasted on the last used row in each column?
    Last edited by Fredma; 04-22-2015 at 03:13 PM.

+ 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. [SOLVED] How to run Loop in VBA to import more than one file
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-29-2015, 02:15 PM
  2. Import data macro/ VBA loop
    By Madskillet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2014, 08:29 AM
  3. Import data Transpose in VBA loop-Thank you!
    By esther723 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2013, 11:42 AM
  4. .txt import loop
    By Littleeleven in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2011, 11:44 AM
  5. Do While Loop to Import Worksheets from Various Workbooks
    By kchm_2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2011, 12:08 AM

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