Skip to main content

How to sum a column or multiple columns based on header name in Excel?

As the below screenshot shown, if a header name is “Mar” in the data range, then return the total value of this column, how to get it done? The method in this article can do you a favor.

Sum a column or multiple columns based on header name with formula
Easily sum a column or multiple columns based on header name with an amazing tool

More tutorials for Sum...


Sum a column or multiple columns based on header name with formula

The formulas in this section will help you sum a column or multiple columns based on specific header name in Excel.

Sum a column based on header name

1. Select a blank cell to output the result, then, copy and paste the below formula into it and press the Enter key to get the result.

=SUM(INDEX(B2:I7,0,MATCH(B9,B1:I1,0)))

Sum two or more columns based on header name

If you want to return the sum of two or more related columns based on a specific header name, you can apply the below formula.

1. Select a blank cell, copy and paste the below formula into it and press the Enter key to get the result.

=SUMPRODUCT((B1:I1=B9)*B2:I7)

Note: In the above formulas, B2:I7 is the data range that you want to use; B9 contains the header name you will sum the column numbers based on; B1:I1 is the range of cells that contains the header name you are searching for. Please change them to meet your needs.


Easily sum a column or multiple columns based on header name with an amazing tool

Besides, for making work more efficient, you can try the LOOKUP and Sum feature of Kutools for Excel. With this feature, you can easily sum a column or multiple columns based on certain header name with only clicks. Please do as follows.

Before applying Kutools for Excel, please download and install it firstly.

1. Click Kutools > Super LOOKUP > LOOKUP and Sum.

2. In the LOOKUP and Sum dialog box, please configure as follows.

  • 2.1 Select Lookup and sum matched value(s) in column(s) option in the Lookup and Sum Type section;
  • 2.2 Specify the lookup data, output range and the data table range in the Select Range section;
  • 2.3 In the Options section, if you only want to sum a column for the first matched value, please check the Return the sum of the first matched value option;
    If you want to sum multiple columns for all matched values, choose the Return the sum of all matched values option;
  • 2.4 Click the OK button.

Then you will get the result immediately based on your settings.
A formula will created at the same time, when changing the original values, the result will update automatically.

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


Related articles

Sum values between two dates range in Excel
When there are two lists in your worksheet, one is the list of dates, the other is the list of the values. And you want to sum up the values between two dates range only, for instance, sum up the values between 3/4/2014 and 5/10/2014, how can you calculate them quickly? Here this article introduces a formula for you to sum up them in Excel.

Sum values based on criteria in another column in Excel
Sometimes you want to sum the values based on criteria in another column, for instance, here I only want to sum up the "Sale Volume" column where the corresponding "Product" column equals "A" as show as below, how can you do it? Of course, you can sum them one by one, but here I introduce some simple methods for you to sum the values in Excel.

Use vlookup and sum in Excel
Using vlookup and sum function helps you quickly find out the specified criteria and sum the corresponding values at the same time. This article showa you how to combine the vlookup and sum in the formula and then use it to vlookup and sum all matches in columns or rows.

Sum multiple columns based on single criteria in Excel
In Excel, you may always need to sum multiple columns based on one criteria. For example, you have a range of date cells, and you want to get the total values of KTE in three months - Jan, Feb and Mar, How can you do? The methods in this article will do you a favor.

More tutorials for Sum...

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you this works perfect, however, I am struggling to also add a date range (2 cells for start date and end date) input by the user
how could I alter the formulae to look at the dates and only return these totals?

Thank You
This comment was minimized by the moderator on the site
Hi Gareth,
Can you upload a screenshot of your data and the desired results?
This comment was minimized by the moderator on the site
Using the example above "sumproduct((B1:I1=b9)*b2:17" i also want to match a particular fruit, what formulae do i add in to get this result?

thank you
This comment was minimized by the moderator on the site
Hi Helen Ramsell,
The following array formula can do you a favor.
=SUMPRODUCT((A2:A7="Banana")*(B1:I1="Jan")*(B2:I7))
After entering the formula, you need to press Ctrl + Shift + Enter keys to get the result.
This comment was minimized by the moderator on the site
Thanks its awesome  
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations