Go Back

How to Sum Values in Excel If They Are Not Blank

We can sum cells when certain values are not blank. We can do this with the SUMIF function. This step by step tutorial will guide all levels of Excel users through summing all non-blank values.

Figure 1: Result of Summed Values that are not blank

Setting up the Data

  • We will set up our data by inputting the SALES and AMOUNT in Column A and Column B respectively

Figure 2: Setting up the Data

Formula

=SUMIF(A4:A9,"<>",B4:B9)

Syntax

=SUMIF(range,"<>",sum_range)

Explanation

With this formula, we will sum the amounts in Column B provided the corresponding Cell in Column A is not blank.

The criteria “<>” is used to indicate cells that are not empty.

Summing the Values

  • We will name Cell C5 as Sales with Amount

Figure 3: Summing Values that are not blank

  • We will input the formula into Cell D5; =SUMIF(A4:A9,"<>",B4:B9)

Figure 4: Summing Values that are not blank

  • Now, we will press ENTER

Figure 5: Result of Summed Values that are not blank

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I need a formula that says if a cell is 0 or blank then do one thing and if not do another. Example of what I have is: =IF(Y4="",1,SUM(N4-Y4)/N4) It works if Y4 is blank but can I make it say if it is blank or 0?
Solved by G. Q. in 15 mins
I need a formula that says if a cell is 0 or blank then do one thing and if not do another. Example of what I have is: =IF(Y4="",1,SUM(N4-Y4)/N4) It works if Y4 is blank but can I make it say if it is blank or 0?
Solved by A. B. in 23 mins
i am using sum to work out balances imported from a csv. If there is no number in the blank column the sum does not work but if i enter 0 and then delete it it works. What is the work around on that? Not had this before
Solved by F. D. in 18 mins

Leave a Comment

avatar