=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)

[TABLE="width: 500"]
<tbody>[TR]
[TD](A1)[/TD]
[TD]Jan (B1)[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]1:e[/TD]
[TD]256[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2:e[/TD]
[TD]IF value here is 0 then grab B2 value.[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3:e[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Anyone know how this could be done?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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