+ Reply to Thread
Results 1 to 7 of 7

Using Hlookup on multiple tables with for..next loop

  1. #1
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Using Hlookup on multiple tables with for..next loop

    Hey somebody help me? i need to make a macro which matches information from sheet 1 to a certain month on another sheet. This macro needs a for next loop because there are multiple tables on sheet 1. It can use a fixed amount of steps to find the input of each table.

    I attached a small sample with on the first sheet ("Information") three tables. On the second sheet ("Timeline") a made a timeline. I standarized all the dates to the first of the month so they can be matched up using the Hlookup function. The Market value (MV) (third line in each table) should be matched to the corresponding month on the timeline.

    If the hlookup formula can not retrieve information for the search value month it should leave the cell empty.
    Attached Files Attached Files
    Last edited by Cerberus; 06-28-2010 at 11:57 AM.

  2. #2
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Hlookup on multiple tables with for..next loop

    Bump no response

  3. #3
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Hlookup on multiple tables with for..next loop

    Bump no response, if i need to adjust my post or add any more information plz tell me

  4. #4
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Hlookup on multiple tables with for..next loop

    I recorded a macro that performs the hlookup action for the first few months. I need it to use the next input table and the next row on the timeline sheet as output when it loops. The input tables are 4 rows x 38 colums big.

    Please Login or Register  to view this content.
    Last edited by Cerberus; 06-30-2010 at 02:35 PM.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using Hlookup on multiple tables with for..next loop

    Why can't you have one Table?

    You will also need to determine which table you are using with this layout.

    I would use the .Find vba method,not a worksheet function
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Hlookup on multiple tables with for..next loop

    the tables on the information sheet (the companies) are generated by a database in that format. I would like the output to be sorted in 1 timeline table. I was thinking the macro could determine what company table to use by using the for... next loop with a fixed amount of steps because all the tables are in the same format on the same sheet ( there are over 1000 companies in the full sample)

  7. #7
    Registered User
    Join Date
    06-26-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Using Hlookup on multiple tables with for..next loop

    I found something using the macro recorder and turning relative references on. This deletes the original tables so i made a backup in advance. It is not looped but i used i shortkey to spam it.

    Please Login or Register  to view this content.

    I have to give credit to the following tutorial: http://www.youtube.com/watch?v=S_bzZpTVmLc
    Last edited by Cerberus; 06-30-2010 at 05:51 PM.

+ 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