+ Reply to Thread
Results 1 to 7 of 7

How to specify cell ranges dynamically?

  1. #1
    Registered User
    Join Date
    06-07-2006
    Posts
    3

    How to specify cell ranges dynamically?

    Hi, I was wondering how I may do the following?

    I have data in several columns. I have calculated a value from these columns and this sits in a cell, say G5. This value dictates how many rows I need to sum up in Column H, say. Is there any way that I can put a formula in a cell which looks something like "=SUM(C <ROW()>:C <ROW()+G5>)" ?

    I.e. sum in column C from the current row to the current row plus the value in G5?????

    Thanks

    Dave

  2. #2
    Ardus Petus
    Guest

    Re: How to specify cell ranges dynamically?

    =SUM(OFFSET(C1,0,0,1,G5))

    HTH
    --
    AP

    "Agent Wild" <[email protected]> a
    écrit dans le message de news:
    [email protected]...
    >
    > Hi, I was wondering how I may do the following?
    >
    > I have data in several columns. I have calculated a value from these
    > columns and this sits in a cell, say G5. This value dictates how many
    > rows I need to sum up in Column H, say. Is there any way that I can put
    > a formula in a cell which looks something like "=SUM(C <ROW()>:C
    > <ROW()+G5>)" ?
    >
    > I.e. sum in column C from the current row to the current row plus the
    > value in G5?????
    >
    > Thanks
    >
    > Dave
    >
    >
    > --
    > Agent Wild
    > ------------------------------------------------------------------------
    > Agent Wild's Profile:
    > http://www.excelforum.com/member.php...o&userid=35163
    > View this thread: http://www.excelforum.com/showthread...hreadid=549348
    >




  3. #3
    Arvi Laanemets
    Guest

    Re: How to specify cell ranges dynamically?

    Hi

    P.e. for X5
    =SUM(OFFSET(C5,G5,0))


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )


    "Agent Wild" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi, I was wondering how I may do the following?
    >
    > I have data in several columns. I have calculated a value from these
    > columns and this sits in a cell, say G5. This value dictates how many
    > rows I need to sum up in Column H, say. Is there any way that I can put
    > a formula in a cell which looks something like "=SUM(C <ROW()>:C
    > <ROW()+G5>)" ?
    >
    > I.e. sum in column C from the current row to the current row plus the
    > value in G5?????
    >
    > Thanks
    >
    > Dave
    >
    >
    > --
    > Agent Wild
    > ------------------------------------------------------------------------
    > Agent Wild's Profile:
    > http://www.excelforum.com/member.php...o&userid=35163
    > View this thread: http://www.excelforum.com/showthread...hreadid=549348
    >




  4. #4
    Arvi Laanemets
    Guest

    Re: How to specify cell ranges dynamically?

    Hi

    P.e. for X5
    =SUM(OFFSET(C5,G5,0))


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )


    "Agent Wild" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi, I was wondering how I may do the following?
    >
    > I have data in several columns. I have calculated a value from these
    > columns and this sits in a cell, say G5. This value dictates how many
    > rows I need to sum up in Column H, say. Is there any way that I can put
    > a formula in a cell which looks something like "=SUM(C <ROW()>:C
    > <ROW()+G5>)" ?
    >
    > I.e. sum in column C from the current row to the current row plus the
    > value in G5?????
    >
    > Thanks
    >
    > Dave
    >
    >
    > --
    > Agent Wild
    > ------------------------------------------------------------------------
    > Agent Wild's Profile:
    > http://www.excelforum.com/member.php...o&userid=35163
    > View this thread: http://www.excelforum.com/showthread...hreadid=549348
    >




  5. #5
    Registered User
    Join Date
    06-07-2006
    Posts
    3
    Thank you for your speedy response! It really is appreciated. It works, by the way (with the last two paramaters switched).

    Thanks again

    Dave

  6. #6
    Roger Govier
    Guest

    Re: How to specify cell ranges dynamically?

    Hi

    One way
    =SUM(C1:INDEX(C:C,G5))

    --
    Regards

    Roger Govier


    "Agent Wild" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi, I was wondering how I may do the following?
    >
    > I have data in several columns. I have calculated a value from these
    > columns and this sits in a cell, say G5. This value dictates how
    > many
    > rows I need to sum up in Column H, say. Is there any way that I can
    > put
    > a formula in a cell which looks something like "=SUM(C <ROW()>:C
    > <ROW()+G5>)" ?
    >
    > I.e. sum in column C from the current row to the current row plus the
    > value in G5?????
    >
    > Thanks
    >
    > Dave
    >
    >
    > --
    > Agent Wild
    > ------------------------------------------------------------------------
    > Agent Wild's Profile:
    > http://www.excelforum.com/member.php...o&userid=35163
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=549348
    >




  7. #7
    Arvi Laanemets
    Guest

    Re: How to specify cell ranges dynamically?

    Sorry, my mistake here.


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )



+ 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