+ Reply to Thread
Results 1 to 7 of 7

Converting Hlookup to Index Match with variable column index number

  1. #1
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    77

    Converting Hlookup to Index Match with variable column index number

    Hello,

    I currently have a hlookup formula as follows in F4:

    =HLOOKUP(B4&"3",$1:$500,2+M4,FALSE)

    This formula is copied down over hundreds of rows, so the column index number in M4 becomes M5 then M6 etc, all of which have different values.

    Now, as this is a large spreadsheet (60mb) I have been told that using Index Match is more efficient than Hlookup. However, I can't figure out how to do it as usually you select the row you want for the match array, and I want it to change on each row based on the value in M.

    Firsty, is it true that Index Match would work better here, and if so can anyone tell me how to do it?

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    10-29-2014
    Location
    udaipur, rajasthan
    MS-Off Ver
    2007
    Posts
    352

    Re: Converting Hlookup to Index Match with variable column index number

    Hi,

    Please upload a sample file if possible.
    And yes "Index match" is better than "vlookup & Hlookups"
    If answer helped you say Thanks by Add Reputation

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,629

    Re: Converting Hlookup to Index Match with variable column index number

    OK, it's a big sheet, but can you post just a few rows so that we can see what you're trying to achieve?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    77

    Re: Converting Hlookup to Index Match with variable column index number

    Example.xlsx

    The hlookups are in column F, the column index numbers arein column M.

    Edit: Calculations are set to manual

  5. #5
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    77

    Re: Converting Hlookup to Index Match with variable column index number

    Oh, and calculations are set to manual, sorry.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,629

    Re: Converting Hlookup to Index Match with variable column index number

    Hi. is this what you wanted? You'll see that I've changed the +2 to +1, 'cos the index match setup runs on the basis of the satrting point of the array (row2) rather than row 1
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    77

    Re: Converting Hlookup to Index Match with variable column index number

    Spot on, thank you.

+ 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. Variable Column Height Index/Match
    By absentminded in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-23-2014, 06:20 PM
  2. Hlookup/index/match
    By doughnut_jimmy in forum Excel General
    Replies: 0
    Last Post: 09-08-2014, 07:57 AM
  3. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  4. How to Index and match to return the last value from variable column
    By abshmo5 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2013, 04:59 AM
  5. Hlookup and Index match?
    By geng in forum Excel General
    Replies: 4
    Last Post: 12-05-2010, 11:21 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