Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt
 
Posts: n/a
Default R1C1 Formula in Excel

I have an RC type formula and I want to dynamically change the end value
based on an entry in A2. I'd prefer to keep IF statements out of it if
possible.

If A2=1, I want it to be
=SUM(RC[9]:RC[9])
If A2=2 I want
=SUM(RC[9]:RC[10])
If A2=3, I want
=SUM(RC[9]:RC[11])

Suggestions?

Thanks,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default R1C1 Formula in Excel

Try =SUM(OFFSET(RC[9],0,0,1,R1C2)). The offset basically defines a range
that begins at RC[9], taking one row and R1C2 columns.

"Barb Reinhardt" wrote:

I have an RC type formula and I want to dynamically change the end value
based on an entry in A2. I'd prefer to keep IF statements out of it if
possible.

If A2=1, I want it to be
=SUM(RC[9]:RC[9])
If A2=2 I want
=SUM(RC[9]:RC[10])
If A2=3, I want
=SUM(RC[9]:RC[11])

Suggestions?

Thanks,
Barb Reinhardt

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default R1C1 Formula in Excel

you can use the INDIRECT function which turns a text string into a reference.
=SUM(INDIRECT("RC[9]:RC["&8+A2&"]"))

"Barb Reinhardt" wrote:

I have an RC type formula and I want to dynamically change the end value
based on an entry in A2. I'd prefer to keep IF statements out of it if
possible.

If A2=1, I want it to be
=SUM(RC[9]:RC[9])
If A2=2 I want
=SUM(RC[9]:RC[10])
If A2=3, I want
=SUM(RC[9]:RC[11])

Suggestions?

Thanks,
Barb Reinhardt

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
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
i edit a formula (excel) then it displays formula not answer caiman Excel Discussion (Misc queries) 2 September 9th 05 02:09 AM
How can i get an If formula in excel to edit another cell? Jimmy Hoffa Excel Worksheet Functions 2 August 16th 05 05:53 PM
converting formula from lotus.123 to excel zaharah Excel Worksheet Functions 2 July 27th 05 03:04 PM
Formula Integrity Not Preserved During Sort in Excel 2000 Kevin Excel Discussion (Misc queries) 1 April 15th 05 10:26 PM


All times are GMT +1. The time now is 06:31 AM.

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

About Us

"It's about Microsoft Excel"