How do I get my formula to show blank when the data is actually blank, and zero when it's actually zero.

AlenK37

New Member
Joined
Aug 2, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello. I'm relatively new to excel and been stuck on a formula now for a that I can't seem to figure out. For most of my data, I am using SUMIF's to get the information I need, which works good for about 99% of the data I need. However, it's leaving the zeros blank, but I need it actually show zeros as well when the result is zero. What is the best approach for this? Perhaps other formulas would be better? I'm currently extracting all the data into a table and referencing the data in my formulas.

Here is my current formula I am using: =IF(SUMIFS($D:$D,$A:$A,$AK127)="","",SUMIFS($D:$D,$A:$A,$AK127))

I've tried many variations of this code, but I still keep getting zero's for empty results.

Side note, the data actually shows a "−" symbol when there is no data, not a blank

Any help or guidance would be much appreciated
 

Attachments

  • help.JPG
    help.JPG
    46.8 KB · Views: 9
Your screenshot didn't come through.
Are you saying in the formula bar you see a "-" ? How is the data getting there ?
I would have expected it to show either a formula or a 0.
I am copying data from one of my work systems via copy and paste. I have a table setup based off the data which is being pasted into A2:U97. The data I am looking at is time based, so depending on the time of the day, it will show a "-" if there is no data yet.
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Assuming you only want to return "" if ALL the cells meeting the AK127 criteria are "-" then give this a try.
Excel Formula:
=IF(COUNTIFS($A:$A,$AK127,$D:$D,"-")=COUNTIFS($A:$A,$AK127),"",SUMIFS($D:$D,$A:$A,$AK127))
 
Upvote 0
Solution
Assuming you only want to return "" if ALL the cells meeting the AK127 criteria are "-" then give this a try.
Excel Formula:
=IF(COUNTIFS($A:$A,$AK127,$D:$D,"-")=COUNTIFS($A:$A,$AK127),"",SUMIFS($D:$D,$A:$A,$AK127))
Yessss. This worked! Thank you!
 
Upvote 0
Yessss. This worked! Thank you!

The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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
Back
Top