Note: The other languages of the website are Google-translated. Back to English

Sum values based on blank or not-blank criteria in Excel

If you have a list of data that contains both values and blank cells, now, you want to sum the values in another column based on the criteria that whether the corresponding cell in your list has values or not. Generally speaking, the normal SUMIF function can solve this problem quickly and easily.


Sum values based on blank cells in Excel

To sum values based on blank cells, please apply the SUMIF function, the generic syntax is:

=SUMIF(range, “”, sum_range)
  • range: The range of cells that contain blank cells;
  • “”: The double quotes represent a blank cell;
  • sum_range: The range of cells you want to sum from.

Take the above screenshot data as an example, to sum the total amount where the products are blank cells in Product field. Please do as this:

Copy or enter the below formula into a blank cell, and then press Enter key to get the result:

=SUMIF(B2:B12,"",C2:C12)


Sum values based on non-blank cells in Excel

The SUMIF function also can help to sum values based on non-blank cells, the generic syntax is:

=SUMIF(range,"<>",sum_range)
  • range: The range of cells that contain blank cells;
  • “<>”: The criteria that indicate cells that are not blank;
  • sum_range: The range of cells you want to sum from.

To sum values where corresponding cells are not blank, please copy or enter the below formula, and then press Enter key to return the result you need:

=SUMIF(B2:B12,"<>",C2:C12)


Relative function used:

  • SUMIF:
  • The SUMIF function can help to sum cells based on one criterion.

More articles:

  • Sum If Cells Contain Specific Text In Another Column
  • This tutorial will show you how to sum values if cells contain specific or partial text in another column. Take the below data range as an example, to get the total amounts of the products containing the text “T-Shirt”, both the SUMIF function and SUMPRODUCT function can deal with this task in Excel.
  • Sum If Greater Than Or Less Than A Specific Value
  • To sum a list of values that are greater than or less than a specific value, the normal SUMIF function can help you to deal with this task. In this article, I will talk about how to use the SUMIF function to finish this problem in Excel.
  • Sum If Equal To One Of Many Things
  • It may be easy for us to sum values based on a given criteria by using the SUMIF function. But, sometimes, you may need to sum values based on a list of items. For example, I have a data range which products are listed in Column A, and the corresponding sale amounts are listed in Column B. Now, I want to get the total amount based on the listed products in range D4:D6 as below screenshot shown. How to solve this problem quickly and easily in Excel?

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL