Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jesmin
 
Posts: n/a
Default Summation problem with Range


Hi Anyone:
I am working in an Excel sheet. I am having trouble to generalize a
summation with the use of Range.
The code that I was using and having an error.

Sheets("Sheet1").Range("D6:G6,D10:G10").FormulaR1C 1="=R[-3]C+R[-1]C"

EXAMPLE:
ROWNUM---D---E---F---G
1-----------10--20--10--40
2-----------15--30--10--10
4-----------10--10--30--40
5-----------20--20--40--10
6-----------*35--50--50--20 *
7-----------10--20--30--40
8-----------10--20--30--40
9-----------20--10--40--10
10----------*30--30--70--50 *
--The sum is not accurate and showing some error for recursive
reference. I have no clue. Looking forward for any help with much
appreciation.


--
jesmin
------------------------------------------------------------------------
jesmin's Profile: http://www.excelforum.com/member.php...o&userid=29540
View this thread: http://www.excelforum.com/showthread...hreadid=522499

  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Summation problem with Range

The ranges are a different number of rows and I assume you want to SUM them
(all rows). Row 3 was missing from your example:

Sheets("Sheet1").Range("D6:G6").FormulaR1C1 = "=sum(R[-5]C:R[-1]C)"

Sheets("Sheet1").Range("D10:G10").FormulaR1C1 = "=sum(R[-3]C:R[-1]C)"

HTH

"jesmin" wrote:


Hi Anyone:
I am working in an Excel sheet. I am having trouble to generalize a
summation with the use of Range.
The code that I was using and having an error.

Sheets("Sheet1").Range("D6:G6,D10:G10").FormulaR1C 1="=R[-3]C+R[-1]C"

EXAMPLE:
ROWNUM---D---E---F---G
1-----------10--20--10--40
2-----------15--30--10--10
4-----------10--10--30--40
5-----------20--20--40--10
6-----------*35--50--50--20 *
7-----------10--20--30--40
8-----------10--20--30--40
9-----------20--10--40--10
10----------*30--30--70--50 *
--The sum is not accurate and showing some error for recursive
reference. I have no clue. Looking forward for any help with much
appreciation.


--
jesmin
------------------------------------------------------------------------
jesmin's Profile: http://www.excelforum.com/member.php...o&userid=29540
View this thread: http://www.excelforum.com/showthread...hreadid=522499


  #3   Report Post  
Posted to microsoft.public.excel.misc
jesmin
 
Posts: n/a
Default Summation problem with Range


Thanks a lot. It solved my problem. Sorry for the delay to get back.


--
jesmin
------------------------------------------------------------------------
jesmin's Profile: http://www.excelforum.com/member.php...o&userid=29540
View this thread: http://www.excelforum.com/showthread...hreadid=522499

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
external named range problem JKC Excel Discussion (Misc queries) 0 March 7th 06 05:23 PM
function problem regarding cell range chindo Excel Worksheet Functions 1 November 10th 05 03:06 AM
Problem with an "if" relating to a range Anthony Excel Worksheet Functions 7 July 10th 05 05:46 AM
a problem with if invovling a range of cells Anthony Excel Worksheet Functions 1 July 9th 05 08:18 PM
Summation Problem cdehrlich Excel Worksheet Functions 2 November 8th 04 05:54 PM


All times are GMT +1. The time now is 02:45 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"