+ Reply to Thread
Results 1 to 4 of 4

Vlookup but don't know the column index number

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    38

    Question Vlookup but don't know the column index number

    Hi,

    I want to ask if there is a way to do a vlookup on a data sheet that I do not know the column index to.

    Explanation: the column index is the "Sales" column. However, this column changes with every new data set....and my data set has like 20+ columns.

    Question: If the Sales column is in the 20+ columns....is there way to do the look up without manually counting up to the Sales column? How do you do it?

    I heard of the indirect formula being useful here, but i don't understand how to use it.

    Thanks in advance

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup but don't know the column index number

    Try something like

    =INDEX(A1:Z1000,MATCH(lookupvalue,A1:A1000,0),MATCH("Sales",A1:Z1,0))

    Make sure A:Z is sufficient to cover all the possible columns.

  3. #3
    Registered User
    Join Date
    07-06-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Vlookup but don't know the column index number

    Thanks, can this also be done with indirect?

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup but don't know the column index number

    Sure, but it's not necessary.
    I tend to avoid Indirect at all costs.

    Quote Originally Posted by fayjohn123 View Post
    Thanks, can this also be done with indirect?

+ 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