Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm trying to find the start of a column on a worksheet. The column start is
based on two variables - row number and column number. The value of RC2 = "value_Gauranteed Cash Value". The value of R1C3 is 11. This is the in whiich the "value_Gauranteed Cash Value" is to be found by the match "XMLSource" is a worksheet in the same workbook. The correct answer would be for the function to return 46 - the row number for the first exact match to the value in RC2. =MATCH(RC2,INDIRECT("XMLSource!R1C"&R1C3&":R966C"& R1C3),0) The match is supposed to tell me where in column 11 does it find the exact match for the value in RC2. What I get is a REF#. What am I doing wrong? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I didn't examine this thoroughly, just enough to spot the first error. So
there may be others, but the obvious one is this: INDIRECT assumes that the string you're handing it expresses the address in A1 format. Since you're using R1C1, you need to add an extra parameter to the INDIRECT function, like this: =MATCH(RC2,INDIRECT("XMLSource!R1C"&R1C3&":R966C"& R1C3,FALSE),0) I prefer R1C1 myself, which is how I know. :-) --- "Don Kline" wrote: I'm trying to find the start of a column on a worksheet. The column start is based on two variables - row number and column number. The value of RC2 = "value_Gauranteed Cash Value". The value of R1C3 is 11. This is the in whiich the "value_Gauranteed Cash Value" is to be found by the match "XMLSource" is a worksheet in the same workbook. The correct answer would be for the function to return 46 - the row number for the first exact match to the value in RC2. =MATCH(RC2,INDIRECT("XMLSource!R1C"&R1C3&":R966C"& R1C3),0) The match is supposed to tell me where in column 11 does it find the exact match for the value in RC2. What I get is a REF#. What am I doing wrong? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
A thousand blessings for your speedy and astute reply. I had forgotten that
extra parameter for the R1C1 format. "Bob Bridges" wrote: I didn't examine this thoroughly, just enough to spot the first error. So there may be others, but the obvious one is this: INDIRECT assumes that the string you're handing it expresses the address in A1 format. Since you're using R1C1, you need to add an extra parameter to the INDIRECT function, like this: =MATCH(RC2,INDIRECT("XMLSource!R1C"&R1C3&":R966C"& R1C3,FALSE),0) I prefer R1C1 myself, which is how I know. :-) --- "Don Kline" wrote: I'm trying to find the start of a column on a worksheet. The column start is based on two variables - row number and column number. The value of RC2 = "value_Gauranteed Cash Value". The value of R1C3 is 11. This is the in whiich the "value_Gauranteed Cash Value" is to be found by the match "XMLSource" is a worksheet in the same workbook. The correct answer would be for the function to return 46 - the row number for the first exact match to the value in RC2. =MATCH(RC2,INDIRECT("XMLSource!R1C"&R1C3&":R966C"& R1C3),0) The match is supposed to tell me where in column 11 does it find the exact match for the value in RC2. What I get is a REF#. What am I doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to use indirect function? | Excel Discussion (Misc queries) | |||
INDIRECT function | Excel Worksheet Functions | |||
=(INDIRECT(ADDRESS(ROW(),#))) with SUMPRODUCT returning #VALUE! | Excel Worksheet Functions | |||
INDIRECT function inside AND function | Excel Worksheet Functions | |||
Help with Indirect function ? | Excel Worksheet Functions |