+ Reply to Thread
Results 1 to 5 of 5

Evaluating a # Lookup Value to get an element in the Range matching the number.!

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Evaluating a # Lookup Value to get an element in the Range matching the number.!

    Evaluating a # Lookup Value to get an element in the Range matching the number.!

    Dear Forum,

    I am aware of using VLOOKUPS and INDEX and MATCH functions individually and also in combination however, I would like to know whether is there a possibilty of using the Numeric answer to get the Value which has no connection with the Number unlike in any LOOKUP function where we use the actual lookup value to match in the LOOKUP range..

    What I mean is, lets say if there are just 15 values which are the Column Headings from lets say $G$1:$U$1...
    and I want to get the Column headings as my answer depending on the number that I get from another expression..

    Lets say if my numeric lookup value is 2 then I need to get the answer as the value in the cell H1, if it were 14 then the value in the cell T1 which is the 14th cell in the selection if i were to consider it from $G$1:$U$1..

    I know that the CHOOSE function is the most appropriate function however it does not take the entire range as its Value, so is there any other function which I can use in this scenario..

    Imagination:
    =CHOOSE(Lookup_Value,$G$1:$U$1) can this be made possible?

    Warm Regards
    e4excel
    Last edited by e4excel; 03-01-2012 at 10:45 AM.

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

    Re: Evaluating a # Lookup Value to get an element in the Range matching the number.!

    how about Index?

    e.g.

    =INDEX($G$1:$U$1,Lookup_Value)

    where Lookup_Value is a number representing column number within range to get data from.
    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
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Evaluating a # Lookup Value to get an element in the Range matching the number.!

    Thanks a lot NBVC,

    That works so simple I should have thought of it..
    I think stress and conjuctivitis in one eye took the better of me..

    But is there any another approach using the CHOOSE Function?

    e4excel

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

    Re: Evaluating a # Lookup Value to get an element in the Range matching the number.!

    Why do you need to do it with the CHOOSE function if you saw the INDEX function is better suited as you pointed out you can't use ranges in CHOOSE.

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Evaluating a # Lookup Value to get an element in the Range matching the number.!

    NO NBVC,

    I have already used it but I just wanted to check as when I started the thread as I was not thinking of the regular functions such as INDEX...
    Somehow, I had thought that CHOOSE was better suited but when I realised that the Values have to be entered separately, it made me think twice and therefore thought maybe if there was a way out of this? not only in terms of getting a solution but also to getting some more from CHOOSE if possible..?

    While researching on the CHOOSE before querying I read a good thread on CHOOSE where it mentioned of the double array method so i just took a chance..
    http://www.excelforum.com/excel-gene...-function.html

    of exploring maybe some unknown possibilities if possible..

    Warm Regards
    e4excel

+ 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