+ Reply to Thread
Results 1 to 5 of 5

From Vlookup to Index

  1. #1
    Registered User
    Join Date
    09-04-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    18

    From Vlookup to Index

    Hi,

    I'd like to reduce the usage of Vlookups, any idea how I can shorten the formula below and use another function, for example, Index - or, any other function that will do the trick?


    =IF('Analysis View'!$A$55="QTR 1 Actual",(VLOOKUP($A132,Mapping!$C$13:$Y$488,Mapping!$I$10,FALSE)),IF('Analysis View'!$A$55="QTR 2 Actual",(VLOOKUP($A132,Mapping!$C$13:$Y$488,Mapping!$N$10,FALSE)),IF('Analysis View'!$A$55="QTR 3 Actual",(VLOOKUP($A132,Mapping!$C$13:$Y$488,Mapping!$O$10,FALSE)),IF('Analysis View'!$A$55="QTR 4 Actual",(VLOOKUP($A132,Mapping!$C$13:$Y$488,Mapping!$P$10,FALSE))))))

    Thanks!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: From Vlookup to Index

    Try:

    =VLOOKUP($A132,Mapping!$C$13:$Y$488,CHOOSE(MID('Analysis View'!$A$55,5,1)+0,Mapping!$I$10,Mapping!$N$10,Mapping!$O$10,Mapping!$P$10),FALSE)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-04-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: From Vlookup to Index

    Hi,

    Thanks for your response. I'm not familiar with the formula you entered as CHOOSE(MID('Analysis View'!$A$55,5,1)+0,. The formula works and if you don't mind, will please expain what it is doing?

    Thank you!

  4. #4
    Registered User
    Join Date
    09-04-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: From Vlookup to Index

    Hi,

    The original nested Vlookup formulas are looking at a QTR (1-4) filter and then extracting from a table / database the value that corresponds to the selected QTR.

    thanks!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: From Vlookup to Index

    Quote Originally Posted by arazoe View Post
    Hi,

    Thanks for your response. I'm not familiar with the formula you entered as CHOOSE(MID('Analysis View'!$A$55,5,1)+0,. The formula works and if you don't mind, will please expain what it is doing?

    Thank you!
    Choose() syntax:

    CHOOSE(Index_num,Value1,Value2,Value3, etc)

    Index_num is a number from 1 to max number of values you enter.

    You can use a formula to get the Index_num, in this case I used Mid() formula.. which extracted the number out of the entry in 'Analysis View'!$A$55. The corresponding item in the values list would be extracted and evaluated, and then supplied to the Vlookup function.

+ 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