Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default INDIRECT function returning REF#

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 257
Default INDIRECT function returning REF#

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default INDIRECT function returning REF#

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use indirect function? Eric Excel Discussion (Misc queries) 6 June 20th 07 10:06 AM
INDIRECT function Tanya Excel Worksheet Functions 2 May 17th 07 09:06 AM
=(INDIRECT(ADDRESS(ROW(),#))) with SUMPRODUCT returning #VALUE! Brian Williams Excel Worksheet Functions 7 March 30th 07 02:28 PM
INDIRECT function inside AND function Biff Excel Worksheet Functions 3 September 23rd 06 07:20 PM
Help with Indirect function ? Richard Buttrey Excel Worksheet Functions 4 May 24th 06 11:27 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"