+ Reply to Thread
Results 1 to 8 of 8

SUM(A1:content of B1)

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    UK
    MS-Off Ver
    Excel 2002
    Posts
    2

    SUM(A1:content of B1)

    Hi,

    I'd like to sum the content of the cells A1:??, where ?? can vary. Actually, ?? is defined another cell, let's say B1 (i.e. the argument of B1 is A10), how do I include in SUM(A1:??) the content of the cell B1, and not B1 itself?

    thanks and regards

    Mauri

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: SUM(A1:content of B1)

    use indirect

    so SUM(INDRIECT("A1:"&B1))
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUM(A1:content of B1)

    Quote Originally Posted by mauz81 View Post
    Hi,

    I'd like to sum the content of the cells A1:??, where ?? can vary. Actually, ?? is defined another cell, let's say B1 (i.e. the argument of B1 is A10), how do I include in SUM(A1:??) the content of the cell B1, and not B1 itself?

    thanks and regards

    Mauri
    One way...

    =SUM(A1:INDIRECT(B1))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: SUM(A1:content of B1)

    How about

    =SUM($A$1:INDIRECT(B1))
    HTH
    Regards, Jeff

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: SUM(A1:content of B1)

    Non-volatile alternative:

    =SUM(A1:INDEX(A:A,MID(B1,2,100)))

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: SUM(A1:content of B1)

    Regarding to Cutter solution I assume you defined A10 as a criteria. But you could enter just 10 in B1 and use:

    =SUM(A1:INDEX(A:A, B1))
    Never use Merged Cells in Excel

  7. #7
    Registered User
    Join Date
    05-17-2012
    Location
    UK
    MS-Off Ver
    Excel 2002
    Posts
    2

    Re: SUM(A1:content of B1)

    thanks to all of you, your solution are all valuable.

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: SUM(A1:content of B1)

    You're welcome. Thanks for the 'star tap'.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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