+ Reply to Thread
Results 1 to 2 of 2

Automated Import of Data from source files

  1. #1
    Registered User
    Join Date
    06-29-2006
    Posts
    3

    Automated Import of Data from source files

    My mentor has given me a project where I have to draw some specific data from some source files. The reason he wants me to do this is because they get the same type of source files annually and its a pain to keep performing such a repetitive, mundane task.

    I don't have much of any excel experience. I'm really having a lot of trouble in seeing whether it is possible for me to do this task. The source files are from the EIA (Energy Information Administration) and they are quite large. I would attach them, but they are too big.

    My first approach to solving this problem was with directly linking data from the source file to the spreadsheet containing all the data that I want. The problem is though is that once a new source file replaces the old one, the design could be different...

    My mentor suggested that I write macros to complete this project... but I don't know if the task can be done in this way either.

    Any suggestions as to what I can do with this project? Any help would be appreciated. Thanks.

  2. #2
    Forum Contributor
    Join Date
    09-04-2006
    Location
    Yorkshire, England
    Posts
    267

    Macros

    Hi
    Have you tried using lookups, these will pull the data for you and should be inputted in the cell

    Formula for excel:

    =VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

    Use when the data you want is located in a column to the left of the data you want to find.

    =HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)

    Use when your comparison values are located in a row across the top of a table of data, and you want to look down a specified number of rows.

    If you recive a N/A error put your lookups in the following:

    =IF(ISNA(VLOOKUP(...,...,...,False)),"0",VLOOKUP(...,...,...,False))


    In Macro/ VBA

    The following has worked for some people(Thanks Lara):

    rng = enter your range here
    Application.VLookup(Range("C4").Value, _rng, 2, False)
    If Not IsError(Results) Then
    MsgBox "Write message here"

    might need tweaking a little


    Hope it helps
    Last edited by JR@SGC; 09-19-2006 at 11:22 AM.
    JR
    Versions
    Mac OS X 'Leopard'
    Mac MS Office Excel 2004
    Windows XP
    MS Excel 2002
    MS Excel 2003

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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