Return blanks instead of zeros if no data in column (MINIFS formula)

lawi227

Board Regular
Joined
Mar 17, 2016
Messages
123
I currently am using this formula:
=MINIFS(AH$71:AH$120,D$71:D$120,$D$4)

However, if there is no data in cells AH71:AH120, then it returns a zero. I want to formula to return blanks rather than a zero. How can I adjust my formula to do so?

Thanks in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I don't have 2016 to test but maybe:

=IF(COUNTIFS(D$71:D$120,$D$4,AH$71:AH$120,"<>"),MINIFS(AH$71:AH$120,D$71:D$120,$D$4),"")
 
Upvote 0
Thanks. The only issue I suppose I have with this is if I use the returned values from the calculation to do another MIN calculation, it will return a zero again. I suppose I can adjust that formula.
 
Upvote 0
This appears to work just fine!

I also have median, max, and average formulas I want to run. There are MAXIFS, AVERAGEIFS functions, so I would assume I can just substitute those functions? What about the median function though?

I don't have 2016 to test but maybe:

=IF(COUNTIFS(D$71:D$120,$D$4,AH$71:AH$120,"<>"),MINIFS(AH$71:AH$120,D$71:D$120,$D$4),"")
 
Upvote 0
I don't use the newest version of excel so I don't get to use MINIFS,

however you can always use an array function for the MEDIAN if the new version doesn't have that,

{=MEDIAN(IF(L:L="yes",K:K,""))}

works well for min, max etc


Column L would be the criteria range, K would be your range to find the median, and in my example "yes" was the criteria,
 
Upvote 0
Like this perhaps:

=IFERROR(MEDIAN(IF(ISNUMBER(AH$71:AH$120),IF(D$71:D$120=$D$4,AH$71:AH$120))),"")

Needs to be entered CNTL-SHIFT-ENTER not just entered.
 
Upvote 0
I forgot the main point of eliminating the 0 :ROFLMAO:

{=IF(MEDIAN(IF(L:L="yes",K:K,""))=0,"",MEDIAN(IF(L:L="yes",K:K,"")))}

Would work, just change you columns etc to suit your data
 
Upvote 0
Just be aware that "" is not the same as zero, so may give a wrong result should you later check to see if the cell contains zero.
 
Upvote 0
HI Steve the fish,

I started to populate my table with more data in cells 71:120, and all of the sudden there are 0.00 that started populating. Any way to troubleshoot? I searched the table to see if I accidentally copy and pasted 0.00 into the table but there are none. Any help would be much appreciated!

After doing some more troubleshooting, I realized that the formula may not have actually worked. It was only showing blanks for columns where there was no data. But lets say there is data in H71:H120 but it does not meat the first criteria (where $D$4 is equal to a cell in $D$71:D$120), then it returns 0.00.

I don't have 2016 to test but maybe:

=IF(COUNTIFS(D$71:D$120,$D$4,AH$71:AH$120,"<>"),MINIFS(AH$71:AH$120,D$71:D$120,$D$4),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,024
Messages
6,122,729
Members
449,093
Latest member
Mnur

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