+ Reply to Thread
Results 1 to 5 of 5

Adding cells with a range

  1. #1
    Registered User
    Join Date
    12-01-2010
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    12

    Adding cells with a range

    Hi guys, im really stuck on this one

    I am trying to add cells together within a range but so it can automatically change if cells are added to the range or removed, for example:

    A1 1
    A2 4
    A3 5
    A4 8
    A5 3
    A6 2
    A7 7

    = (A1:A whatever) with a formula that can add (a1+a2) + (a1+a3) + (a1+a4) etc.

    to give a total

    thanks for your help if you have any question just ask

    xx

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Adding cells with a range

    a1*count(a2:a100)+sum(a2:a100)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Adding cells with a range

    Try this:

    =SUM(A2:Awhatever)+A1*count(A2:A whatever)

  4. #4
    Registered User
    Join Date
    12-01-2010
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Adding cells with a range

    sorry i didn't proof read the post i only want the sum with cells with a higher number to be added and the lower one to be taking away.

    sorry i know that is a completely different question and way more complicated :S

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Adding cells with a range

    what if its = to ?
    but if its less than and greater than
    =A1*COUNT(A2:A100)-SUMIF(A1:A100,"<"&A1)+SUMIF(A1:A100,">"&A1)
    Last edited by martindwilson; 12-14-2010 at 11:01 AM.

+ 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