Excel formula to return blank instead of zero

SamCha

New Member
Joined
Nov 23, 2020
Messages
28
Office Version
  1. 2016
Platform
  1. Windows
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
 

Some videos you may like

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
Joined
Dec 30, 2008
Messages
12,496
Office Version
  1. 365
Platform
  1. Windows
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)),"")
 
Solution

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
48,400
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Nov 23, 2020
Messages
28
Office Version
  1. 2016
Platform
  1. Windows
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
Joined
Nov 23, 2020
Messages
28
Office Version
  1. 2016
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top