View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Thomas [PBD] Thomas [PBD] is offline
external usenet poster
 
Posts: 154
Default Indirect function syntax

Matt,

There were a couple minor errors in the coding, here is a tested (on my
sheet), working function:

=MATCH(G1,INDIRECT("Sheet3!D"&MATCH(B4,Sheet3!$A$2 :$A$21647,0)&":D"&MATCH(B4,Sheet3!$A$2:$A$21647,1) ),-1)

Took the 's away from Sheet3 in the INDIRECT. Added &":D"& instead of the
second INDIRECT function as it was unneeded. Rearranged the parenthesis.
Note, this will return the first value of the array set by the indirect
function (hope that is what you were going for instead of the row number
itself).

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''''Yes'''' below.


"Matt" wrote:

I am trying to use the following formula:

=MATCH(G1,INDIRECT("'Sheet3'!"&"D"&MATCH(B4,Sheet3 !$A$2:$A
$21647,0)):INDIRECT("D"&MATCH(B4,Sheet3!$A$2:$A$21 647,1)),-1)

but keep getting the #VALUE!. When I do the formula auditing, it
works until he

=MATCH(125,Sheet3!$D$21323:$D$21645,-1)
then:
=MATCH(125,#VALUE,-1)

Am I doing something wrong?

Thanks for any help!