+ Reply to Thread
Results 1 to 3 of 3

Variable in Excel Sum formula

  1. #1
    KMR
    Guest

    Variable in Excel Sum formula

    I have a list of rows with columns A1 to H1. Based on some criteria, I need
    to sum from A1 to H1 or E3 to H3 or any possibility. If I store the
    beginning cell in a cell like J1 or J3, how can I use the value of the cell
    and not the cell itself? I want something like sum(actual value of
    cell(J1):ending cell))

  2. #2
    Peo Sjoblom
    Guest

    Re: Variable in Excel Sum formula

    You can use index

    =SUM(INDEX(A1:H3,1,5):INDEX(A1:H3,1,8))

    replace 1,5 and 1, 8 with cells where you put the numbers
    the above will sum E1:H1, 1 is the row number and 5 starting column (E) and
    8 ending (H)

    it's better to use this instead of indirect or offset since it is
    non-volatile


    --

    Regards,

    Peo Sjoblom


    "KMR" <[email protected]> wrote in message
    news:[email protected]...
    >I have a list of rows with columns A1 to H1. Based on some criteria, I
    >need
    > to sum from A1 to H1 or E3 to H3 or any possibility. If I store the
    > beginning cell in a cell like J1 or J3, how can I use the value of the
    > cell
    > and not the cell itself? I want something like sum(actual value of
    > cell(J1):ending cell))




  3. #3
    Bob Phillips
    Guest

    Re: Variable in Excel Sum formula

    =SUM(INDIRECT(J1&":H1"))

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "KMR" <[email protected]> wrote in message
    news:[email protected]...
    > I have a list of rows with columns A1 to H1. Based on some criteria, I

    need
    > to sum from A1 to H1 or E3 to H3 or any possibility. If I store the
    > beginning cell in a cell like J1 or J3, how can I use the value of the

    cell
    > and not the cell itself? I want something like sum(actual value of
    > cell(J1):ending cell))




+ 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