ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Index function to pluck cells? (https://www.excelbanter.com/excel-programming/356590-using-index-function-pluck-cells.html)

Don Wiss

Using Index function to pluck cells?
 
Z6 is our index number. It can be either 1, 2, or 3. Putting numbers in an
array like this works:

=INDEX({1;1;0},Z6)

But I want it to pluck values from cells. So I tried this, which doesn't
work:

=INDEX({F6;K6;0},Z6)

I really don't want to move the values to adjacent cells to make a range.
Suggestions?

Don <www.donwiss.com (e-mail link at home page bottom).

Tom Ogilvy

Using Index function to pluck cells?
 
=choose(Z6,F6,K6,0)

--
Regards,
Tom Ogilvy


"Don Wiss" wrote in message
...
Z6 is our index number. It can be either 1, 2, or 3. Putting numbers in an
array like this works:

=INDEX({1;1;0},Z6)

But I want it to pluck values from cells. So I tried this, which doesn't
work:

=INDEX({F6;K6;0},Z6)

I really don't want to move the values to adjacent cells to make a range.
Suggestions?

Don <www.donwiss.com (e-mail link at home page bottom).




Don Wiss

Using Index function to pluck cells?
 
On Mon, 20 Mar 2006 21:51:14 -0500, Tom Ogilvy wrote:

Don Wiss wrote:
But I want it to pluck values from cells. So I tried this, which doesn't
work:

=INDEX({F6;K6;0},Z6)


=choose(Z6,F6,K6,0)


Thank you. I was not aware of the Choose function.

Don <www.donwiss.com (e-mail link at home page bottom).

Tom Ogilvy

Using Index function to pluck cells?
 
Within its limitations, it can be great. It is limited to 29 arguments.

--
Regards,
Tom Ogilvy

"Don Wiss" wrote in message
...
On Mon, 20 Mar 2006 21:51:14 -0500, Tom Ogilvy wrote:

Don Wiss wrote:
But I want it to pluck values from cells. So I tried this, which

doesn't
work:

=INDEX({F6;K6;0},Z6)


=choose(Z6,F6,K6,0)


Thank you. I was not aware of the Choose function.

Don <www.donwiss.com (e-mail link at home page bottom).





All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com