+ Reply to Thread
Results 1 to 4 of 4

Summing a variable number of cells

  1. #1
    Registered User
    Join Date
    07-22-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    58

    Summing a variable number of cells

    Hey all,

    Have a look at the row below: (Sorry I cant attach files for some reason)

    A B C D E F G H I
    12 13 45 22 45 46 70 5


    I'm looking for a formula for column 'I' that would add the numbers on the row according the the number in cell H1.

    so in this example, because 'H1' =5 , cell 'I1' would be sum(A1:E1)

    and if 'H1' was 4, then cell 'I1' would be sum(A1:D1)


    Any help is really appreciated

    Thanks
    Lovi
    Last edited by lovi; 09-06-2011 at 07:55 PM. Reason: wasnt displaying properly

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Summing a variable number of cells

    You can use the offset function to set the width of the sum...

    Please Login or Register  to view this content.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Summing a variable number of cells

    Try this
    Please Login or Register  to view this content.
    [EDIT]
    Apologies Chance2 didn't see your post
    Last edited by Marcol; 09-06-2011 at 07:51 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    07-22-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Summing a variable number of cells

    hello Chance2, this works. Thank you!

+ 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