Results 1 to 9 of 9

Thread: Reverse Vlookup Using Choose Function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    15
    Quote Originally Posted by Excel Fox View Post
    Maybe not. CHOOSE({1,2},B2:B10,A2:A10) is the same as CHOOSE({2,1},A2:A10,B2:B10) but not the same as CHOOSE({1,2},A2:A10,B2:B10)
    I was not referring to the order CHOOSE uses to select from among its arguments (that order is a fixed... 1 refers the second argument, 2 refers to the 3rd argument, etc.), rather, I was referring to the array of cells that CHOOSE presents to VLOOKUP as a result of executing its (implied) array formula. I am guessing you were thinking (originally) CHOOSE({1,2},B2:B10,A2:A10) presents Column B followed by Column A to the VLOOKUP function thereby reversing VLOOKUP's normal order of processing columns, whereas CHOOSE({2,1},A2:A10,B2:B10) presents Column A followed by Column B... all I am saying is that either presents Column A followed by Column B to VLOOKUP (hence, we both used 2 as the "lookup" column), so that there was no need to reverse the numerical order of the array elements in the first argument so long as you make each of them refer to the correct column. Or did I simply misunderstand your original intent?

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    And the only intent was to tell the reader that even though you pass the LOOKIN arrays in sequential order, you still can reverse its order by reversing the order of numbers in the first argument array of the CHOOSE function.

    Which means that if you pass the LOOKIN array in the desired order already, you don't need to reverse the sequential numbers in the index argument of the CHOOSE function.

    3rd point. CHOOSE({1,2},A:A,B:B) doesn't pass the element to VLOOKUP as A:B, rather, it passes a combination of multiple arrays having 2 element each, one from A and one from B. The VLOOKUP function actually looks up at these individual combination of arrays.

    Which leads to the point that if one were to write VLOOKUP(LookupValue, CHOOSE({2,1},C1:C10,A1:B10),3,0), the formula would return a reference error, because CHOOSE (or Excel) isn't actually combining the array in to a range, but in to multiple arrays
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Replies: 2
    Last Post: 04-16-2013, 01:36 PM
  2. Reverse name in excel with upper case,edit formula
    By shrinivasmj in forum Excel Help
    Replies: 3
    Last Post: 09-11-2012, 01:31 PM
  3. Choose from several sheets
    By marreco in forum Excel Help
    Replies: 3
    Last Post: 08-29-2012, 02:46 AM
  4. Replies: 4
    Last Post: 08-14-2012, 03:17 AM
  5. How to Get Comment by Vlookup Function :
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 0
    Last Post: 10-13-2011, 05:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •