Consulting

Results 1 to 3 of 3

Thread: Import file to update

  1. #1
    VBAX Tutor
    Joined
    Mar 2010
    Posts
    287
    Location

    Question Import file to update

    Hi all...I was hoping to get some help on a small problem

    I have a sheet (say A:G) that contains data from a file. In the adjacent columns the user can input information (say H:L).

    The data in columns A:G needs to be updated from a report (which can grow massively in one day) but I need to ensure I retain the data from H:L as this is manually entered.

    I would like a macro to import a file (CSV) into sheet "DATA", and also pull it into an array or collection > then using an reference built from the first 3 columns (client, partner, period) lookup the data already existing in H:L.

    The completed array / collection can then be pasted as values back over A:L on the original sheet.

    How can I load the imported file into an array, then build a reference and lookup the data already in H:L? Then dump it all back into the sheet A:L

    Any help appreciated

    1. All current data is contained in "Sheet1"
    2. Import new file into "DATA"
    3. Load into an array
    4. Build references
    5. Lookup data from "Sheet1" H:L
    6. Overwrite all information in "Sheet1"

    Or if you can think of a better method I will gladly listen

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    If you post sample files, we can more easily create code to suit.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Tutor
    Joined
    Mar 2010
    Posts
    287
    Location

    Exclamation Sample file

    Please find sample file attached

    http://www.mediafire.com/?etrkvuyfl0x2dka

Posting Permissions

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