• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Choose function

GN0001

Member
How does this array choose function work?
=CHOOSE({1,2,3},$D$5:$D$17,$B$5:$B$17,$C5:C17)
Thank you for the help,
GN0001
 

Attachments

  • lookup-to-left.xls
    40 KB · Views: 10
1,2,3 is the order of your 3 arrays $D$5:$D$17,$B$5:$B$17,$C5:C17

  • Array 1 will be $D$5:$D$17
  • Array 2 will be $B$5:$B$17
  • Array 3 will be $C5:C17
In your file the formula '=VLOOKUP(1088,CHOOSE({1,2,3},$D$5:$D$17,$B$5:$B$17,$C5:C17),2,0) is asking to retrieve a value from Array 2 ($B$5:$B$17), corresponding to the value 1088 which is "John".

Hope I explained it correctly.
 
'=VLOOKUP(1088,CHOOSE({1,2,3},$D$5:$D$17,$B$5:$B$17,$C5:C17),2,0)
If we search for the value in Array: $D$5:$D$17 and then return corresponding value from the array: $B$5:$B$17
Then why do we bring up array:$C5:C17?

----------------------------------------------------------------------
What does this function do individually without being used in VLookUp function?

=CHOOSE({2,1},$B$5:$B$17,$D$5:$D$17)

What is the role of 2 here?

We always select from the first array which is array 1, then what does 2 do in choose ({2,1})?

When I do F2 and F9, this is what I have in array: 1592,"Joseph"

That returns:1592

Any help is greatly appreciated.

Thanks,

GN
 
Back
Top