Skip to main content

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

Sum values based on criteria in another column with formula in Excel

Sum values based on criteria in another column with Pivot table in Excel

Sum values based on criteria in another column with Kutools for Excel

Split data to new sheets by criteria column, and then sum


Sum values based on criteria in another column with formula in Excel

In Excel, you can use formulas to quickly sum the values based on certain criteria in an adjacent column.

1. Copy the column you will sum based on, and then pasted into another column. In our case, we copy the Fruit column and paste in Column E. See screenshot left.

2. Keep the pasted column selected, click Data > Remove Duplicates. And in the popping up Remove Duplicates dialog box, please only check the pasted column, and click the OK button.

3. Now only unique values are remained in the pasted column. Select a blank cell besides the pasted column, type the formula =SUMIF($A$2:$A$24, D2, $B$2:$B$24) into it, and then drag its AutoFill Handle down the range as you need.

And then we have summed based on the specified column. See screenshot:

Note: In above formula , A2:A24 is the column whose values you will sum based on, D2 is one value in the pasted column, and B2:B24 is the column you will sum.

Easily sum/count/average values based on criteria in another column in Excel

Kutools for Excel’s Advanced Combine Rows utility can help Excel users to batch sum, count, average, max, min the values in one column based on the criteria in another column easily.


doc sum by criteria in another column 02

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now

Sum values based on criteria in another column with Pivot table in Excel

Besides using formula, you also can sum the values based on criteria in another column by inserting a Pivot table.

1. Select the range you need, and click Insert > PivotTable or Insert > PivotTable > PivotTable to open the Create PivotTable dialog box.

2. In the Create PivotTable dialog box, specify the destination rang you will place the new PivotTable at, and click the OK button.

3. Then in the PivotTable Fields pane, drag the criteria column name to the Rows section, drag the column you will sum and move to the Values section. See screenshot:

Then you can see the above pivot table , it has summed the Amount column based on each item in the criteria column. See screenshot above:


Sum values and combine based on criteria in another column with Kutools for Excel

Sometimes, you may need to sum values based on criteria in another column, and then replace original data with the sum values directly. You can apply Kutools for Excel's Advanced Combine Rows utility.

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy a full-featured 30-day FREE trial with no credit card required! Download now!

1. Select the range that you will sum values based on criteria in another column, and click Kutools > Content > Advanced Combine Rows.

Please note that the range should contain both the column you will sum based on and the column you will sum.

2. In the opening Combine Rows Based on Column dialog box, you need to:
(1) Select the column name that you will sum based on, and then click the Primary Key button;
(2) Select the column name that you will sum, and then click the Calculate > Sum.
(3) Click the Ok button.

Now you will see the values in the specified column are summed based on the criteria in the other column. See screenshot above:

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Demo: Sum values based on criteria in another column with Kutools for Excel


Kutools for Excel: Over 300 handy tools at your fingertips! Start your 30-day free trial with no feature limitations today. Download Now!

Easily split a range to multiple sheets based on criteria in a column in Excel

Kutools for Excel’s Split Data utility can help Excel users easily split a range to multiple worksheets based on criteria in one column of original range.


ad split data 0

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now

Relative Articles:

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 (16)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
i need one excel sheet column total value automatically to another excel sheet to generate repot.
This comment was minimized by the moderator on the site
You are amazing!!

Thanks for this!
Rated 5 out of 5
This comment was minimized by the moderator on the site
In the latest Excel, you need to use ; instead of , as the separator for the arguments, so '=SUMIF($A$2:A15; D2; $B$2:$B$15)' is the correct syntax in the first example.  
This comment was minimized by the moderator on the site
Hi,I want to sum a range of numbers in a column, which will start with a particular text in another column and till a particular text in same text column. Please help
This comment was minimized by the moderator on the site
I have two Columns A & B. A is a numeric value as well as B. I want to: If A equals (say 4) or more, then count B. I want the sum count of all B's added.
ex:
A. B. 1 54 76 103 9
Sum: 17
Any help? I imagine it is some sort of countif function - has been a while for me.
Thanks!
This comment was minimized by the moderator on the site
Hi,=SUMIF(A1:A4,">="&4,B1:B4)
This comment was minimized by the moderator on the site
wow, thank you so much, i learnt a new thing from ua article, it helped me a lot & saved lot of my time
This comment was minimized by the moderator on the site
if two coulumn have same fruit then add them like this
apple orange grapes apple
2 4 5 7
5 4 3 23
21 3 34 22

then i would like to add total no. of apples
can this be done by any formula or some tricks
This comment was minimized by the moderator on the site
Hi Surat,
What about adding the total number manually?
Holding the SHIFT key, select both Apple columns simultaneously, and then you will get the total number in the status bar.
This comment was minimized by the moderator on the site
Hi. I have two types of Payments in cell G5:G51 ("Security" and "Rental"). The amount is in cell H5:H51. I wan to sum up all the security Payments in Cell K5 and All Rental Payments in Cell K6. How can I do it.
This comment was minimized by the moderator on the site
thanks for the excellent - quick & easy instructions for creating totals based on "distinct" values
This comment was minimized by the moderator on the site
I want sum FABRICS 2014> 16.90 mtr N-15FLAT011W/O STONES(BLUE) 16.90 mtr SP12044-GGT-TL#1255 FNC 2014 > N-MT#28-#4(SILVER) 11.50 mtr N-MT#5-#7(SKY BLUE) 28.90 mtr FPR 2014> M-FML-A478(RED) 6.79 mtr N-PR-#8961-(PINK) 18.30 mtr
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations