+ Reply to Thread
Results 1 to 10 of 10

formula to sum an entire column except the last cell

  1. #1
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    formula to sum an entire column except the last cell

    Hi,

    I have an amount in column "B" (for example "B7:B25" and "B26" has Total of "B7:B25". (length is variable).


    I want sum in cell "C5".

    How can I sum all values in the range except the last one?
    My English is very poor, so please be patient >_<"

    Thanks & Regards.
    hkbhansali

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: formula to sum an entire column except the last cell

    Hi

    One way

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Personally, and ever since I stopped using lined paper and pencils to add up a column of numbers, I always put the SUM() function in Excel ABOVE the data and set it t sum as many cells as you're ever likely to have. That means it's fixed and you don't have to worry abut adding new data.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: formula to sum an entire column except the last cell

    or
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    490

    Re: formula to sum an entire column except the last cell

    Two other alternatives:

    =SUMPRODUCT(B7:B26*NOT(ISFORMULA(B7:B26)))

    or:

    =SUBTOTAL(9,B7:B26)
    provided that in B26 also a SUBTOTAL(9,B7:B25) is used instead of SUM(B7:B25).
    SUBTOTAL() here ignores another SUBTOTAL().

  5. #5
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: formula to sum an entire column except the last cell

    Hi RaulSerg

    row length may be variable..Sometime B7:B65, or Sometime B7:B54... and more

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: formula to sum an entire column except the last cell

    You could try this:

    =SUM(B7:B5000)-LOOKUP(2,1/(B7:B5000<>""),B7:B5000)

    Make the range longer than it will ever need to be.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: formula to sum an entire column except the last cell

    Thanks AliGW

  8. #8
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: formula to sum an entire column except the last cell

    Thanks ...RaulSerg - Vraag en antwoord - Richard Buttrey

    Thanks for your kind support..

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: formula to sum an entire column except the last cell

    No problem.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: formula to sum an entire column except the last cell

    Quote Originally Posted by hkbhansali View Post
    Hi RaulSerg

    row length may be variable..Sometime B7:B65, or Sometime B7:B54... and more
    The number of rows don't matter if you simply sum all the values INCLUDING the total and divide by two.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Loop to clear cell contents by column (but not entire column)
    By codys21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2016, 03:26 PM
  2. Replies: 5
    Last Post: 08-21-2015, 12:10 PM
  3. copy formula down entire column while changing formula cell reference
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2013, 11:34 AM
  4. [SOLVED] Formula only being entered into one cell, not being copied down entire column
    By csh8428 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2012, 10:43 AM
  5. Replies: 0
    Last Post: 09-04-2011, 09:14 AM
  6. applying a formula to more than one cell or entire column
    By excelerate2007 in forum Excel General
    Replies: 4
    Last Post: 03-29-2007, 10:08 AM
  7. Replies: 3
    Last Post: 06-12-2006, 11:30 PM

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