# Excel formula to return blank instead of zero

#### SamCha

##### New Member
Hi all,

I want the cell to return blank instead of zero where the cell has no values. I am using the below IF function for the solution. I need to use the SUMIF function as I am finding out the end balance of debit and credit accounts. Are u able to suggest an easier way to return blank please.

Excel Formula:
``=IF(SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11) =0,"",SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11))``

Thanks

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### jasonb75

##### Well-known Member
One way that comes to mind
Excel Formula:
``=IFERROR(1/(1/(SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11))),"")``
Possibly this will also work if I'm following the logic correctly
Excel Formula:
``=IFERROR(1/(1/SUMIFS(\$B\$4:\$B\$11,\$C\$4:\$C\$11,A13,\$A\$4:\$A\$11,"<>"&A13)),"")``

#### Peter_SSs

##### MrExcel MVP, Moderator
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, IF you have Excel 365 with the LET function, then you could also try
Excel Formula:
``=LET(si,SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11),IF(si=0,"",si))``

#### SamCha

##### New Member
One way that comes to mind
Excel Formula:
``=IFERROR(1/(1/(SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11))),"")``
Possibly this will also work if I'm following the logic correctly
Excel Formula:
``=IFERROR(1/(1/SUMIFS(\$B\$4:\$B\$11,\$C\$4:\$C\$11,A13,\$A\$4:\$A\$11,"<>"&A13)),"")``
Thanks a lot Jasonb75 the first one worked really well for me. The second function didnt work as my end balance changed.

#### SamCha

##### New Member
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, IF you have Excel 365 with the LET function, then you could also try
Excel Formula:
``=LET(si,SUMIF(\$C\$4:\$C\$11,A13,\$B\$4:\$B\$11)-SUMIF(\$A\$4:\$A\$11,A13,\$B\$4:\$B\$11),IF(si=0,"",si))``
Thanks a lot Peter. I have updated my account details as per your suggestion. I have 2016 version.

#### Peter_SSs

##### MrExcel MVP, Moderator
I have updated my account details as per your suggestion.
Thanks for doing that.

Replies
4
Views
66
Replies
7
Views
207
Replies
2
Views
159
Replies
9
Views
162
Replies
8
Views
79

1,128,135
Messages
5,628,905
Members
416,352
Latest member
Lunox01

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back