ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a way to use a cell value as a parm in a canned function? (https://www.excelbanter.com/excel-discussion-misc-queries/163534-there-way-use-cell-value-parm-canned-function.html)

Rich

Is there a way to use a cell value as a parm in a canned function?
 
Using: =INDEX(A5:A748,MATCH(J2,E5:E748,0),1)

The first parm of INDEX is an array spec. Is there a way I can use the
value of cell K1 (which would contain A5) and the value of cell L1 (which
would contain A748) in the function?




Rick Rothstein \(MVP - VB\)

Is there a way to use a cell value as a parm in a canned function?
 
You can use the INDIRECT function to build a reference from text. Give this
a try...

=INDEX(INDIRECT(K1&":"&L1),MATCH(J2,E5:E748,0),1)

Rick


"Rich" wrote in message
...
Using: =INDEX(A5:A748,MATCH(J2,E5:E748,0),1)

The first parm of INDEX is an array spec. Is there a way I can use the
value of cell K1 (which would contain A5) and the value of cell L1 (which
would contain A748) in the function?





Peo Sjoblom

Is there a way to use a cell value as a parm in a canned function?
 
=INDEX(INDIRECT(K1&":"&L1),MATCH(J2,E5:E748,0),1)

However I would probably use

=INDEX(INDEX(A:A,K1):INDEX(A:A,L1),MATCH(J2,E5:E74 8,0))

and put 5 in K1 and 748 in L1 that way the formula wouldn't be volatile


--


Regards,


Peo Sjoblom




"Rich" wrote in message
...
Using: =INDEX(A5:A748,MATCH(J2,E5:E748,0),1)

The first parm of INDEX is an array spec. Is there a way I can use the
value of cell K1 (which would contain A5) and the value of cell L1 (which
would contain A748) in the function?






Rich

Is there a way to use a cell value as a parm in a canned function?
 
Thanks Rick, worked great.

Peo's worked with this change...
=INDEX(INDIRECT("A"&K3&":A"&L3),MATCH(J2,E5:E748,0 ))

Hope I got that right.

Regads.


"Rich" wrote:

Using: =INDEX(A5:A748,MATCH(J2,E5:E748,0),1)

The first parm of INDEX is an array spec. Is there a way I can use the
value of cell K1 (which would contain A5) and the value of cell L1 (which
would contain A748) in the function?




Rick Rothstein \(MVP - VB\)

Is there a way to use a cell value as a parm in a canned function?
 
Peo's worked fine for me... use exactly what he posted AND make sure you
only have a number in K1 and L1, NOT the cell reference. That is, don't put
A5 in K1, just put 5 in there (the formula gets the A from the A:A
reference).

Rick


"Rich" wrote in message
...
Thanks Rick, worked great.

Peo's worked with this change...
=INDEX(INDIRECT("A"&K3&":A"&L3),MATCH(J2,E5:E748,0 ))

Hope I got that right.

Regads.


"Rich" wrote:

Using: =INDEX(A5:A748,MATCH(J2,E5:E748,0),1)

The first parm of INDEX is an array spec. Is there a way I can use the
value of cell K1 (which would contain A5) and the value of cell L1 (which
would contain A748) in the function?






All times are GMT +1. The time now is 08:57 PM.

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