How to sum entire column except header/first row in Excel？
There is a long list of values in your worksheet, and sometimes you will add or delete some values in this list, how could you automatically sum up the total of them in the first cell? Now, you need to sum entire column except the header or first row in Excel.
In Excel, using a formula will be a good and easy choice for most Excel users.
In Excel 2007/2010/2013, type this formula =SUM(A2:A1048576) (A is the column you want to sum) into the first cell of your list, then press Enter button on the keyboard. You can see the total of the list is summed up in the first cell and changes automatically as the list changes.
Tip: In Excel 2003, you can use this formula =SUM(A2:A655366).
Using a Function also can sum the entire column except headers in Excel.
1. Select a cell of the column you want to select and press Alt + F11 to open the Microsoft Visual Basic for Applications window.
2. In the pop-up window, click Insert > Module, then paste the following VBA code into the module.
VBA: Extract number only
Public Function SumColumn(pRng As Range) As Double 'Updateby20140510 Dim xColIndex As Integer Dim xRowIndex As Integer Dim ws As Worksheet Set pRng = pRng.Columns(1) Set ws = pRng.Parent xIndex = pRng.Column xRowIndex = ws.Cells(Rows.Count, xIndex).End(xlUp).Row Set pRng = ws.Range(ws.Cells(2, xIndex), ws.Cells(xRowIndex, xIndex)) SumColumn = Application.WorksheetFunction.Sum(pRng) End Function
3. Save the code and close the window, then type this formula =SumColumn(A1) (A1 is the first cell in the list column) into the first cell of list column, press Enter button, then the list except the header is summed up.
Tip: If you change the values in the list, you need to refresh the total of the list column with double clicking the formula cell (in our case it is Cell A1) and pressing the Enter key.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!