Min IFs

jlkirst

New Member
Joined
Sep 29, 2009
Messages
2
Probably best to start with the Maxif to show you where i am.

{=MAX(IF(Data.!A:A=SRLlist!A358,Data.!Z:Z))}. basically, there is list of 'names' (SRLlist!A358 in this case) that match names on another sheet (data! sheet, column A) for which there are multiple entries. This formula gives me the max (in this case a date, residing in Data.!, column 'Z'). this works fine.

But, i really need the MIN. But, it must be the min > 0. Many on the list of Data.! have no value for 'Z' and it comes as a zero.

This is what my little brain come up with, but returns the zero
{=MIN(IF(AND(Data.!A:A=SRLlist!A358, Data.!Z:Z>0), Data.!Z:Z))}

Probably not giving any real reference for the zero to be compared against.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Probably best to start with the Maxif to show you where i am.

{=MAX(IF(Data.!A:A=SRLlist!A358,Data.!Z:Z))}. basically, there is list of 'names' (SRLlist!A358 in this case) that match names on another sheet (data! sheet, column A) for which there are multiple entries. This formula gives me the max (in this case a date, residing in Data.!, column 'Z'). this works fine.

But, i really need the MIN. But, it must be the min > 0. Many on the list of Data.! have no value for 'Z' and it comes as a zero.

This is what my little brain come up with, but returns the zero
{=MIN(IF(AND(Data.!A:A=SRLlist!A358, Data.!Z:Z>0), Data.!Z:Z))}

Probably not giving any real reference for the zero to be compared against.

Try to use definite ranges like A2:A400 instead of A:A... That said:

Control+shift+enter, not just enter...

Code:
=MIN(
  IF(Data.!A2:A400=SRLlist!A358,
  IF(ISNUMBER(Data.!Z2:Z400),
  IF(Data.!Z2:Z400>0,
    Data.!Z2:Z400))))
 
Upvote 0
Thanks! Worked great. I knew I was probably making things harder without definite ranges. Hadn't considered using ISNUMBER. Very slick.
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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