=MAXIFS can't be 0

Weeble

Board Regular
Joined
Nov 30, 2016
Messages
95
Office Version
  1. 365
I am using a MAXIFS formula to determin a MAX value based on date and day from antother sheet
Problem is if there is no value on a date it will return 0. I need a formula that states IF the MAX returns 0, then it should just grab the number on the date above it.
ex.

Code:
=MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2)

(A1)Jan (B1)FebMarApr
1:e256
2:eIF value here is 0 then grab B2 value.
3:e

<tbody>
</tbody>

Anyone know how this could be done?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Well, the longhand would be:

Code:
=IF(MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2)=0;B2;MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2))

But you might get away with:

Code:
=IFERROR(1/1/MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2);B2)

WBD
 
Upvote 0
Well, the longhand would be:

Code:
=IF(MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2)=0;B2;MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2))

This worked :)


Code:
=IFERROR(1/1/MAXIFS(Lager!$D:$D;Lager!$A:$A;B5;Lager!$B:$B;$C$2);B2)

Tried this one out, but ended up with 0,00049 so I guess if I don't have an even number it won't get get 0 and give me a decmal number instead.


But thank you for the help!
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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