+ Reply to Thread
Results 1 to 3 of 3

Summation problem with Range

  1. #1
    Registered User
    Join Date
    12-10-2005
    Posts
    30

    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").FormulaR1C1="=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.

  2. #2
    Toppers
    Guest

    RE: 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").FormulaR1C1="=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. #3
    Registered User
    Join Date
    12-10-2005
    Posts
    30
    Thanks a lot. It solved my problem. Sorry for the delay to get back.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1