# array formula using 2 criteria

#### nisselyo

##### Board Regular
My formula works when I use only one criteria but when I include an and with a second criteria it doesnt work - any idea why?

This one works:
=MIN(IF('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,'Citi - Sheet1'!\$E\$2:\$E\$10091))
and this one works
=MIN(IF('Citi - Sheet1'!\$D\$2:\$D\$10091=45,'Citi - Sheet1'!\$E\$2:\$E\$10091))

but when I combine these 2 criteria I get 0 - which is incorrect
=MIN(IF(AND('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,'Citi - Sheet1'!\$D\$2:\$D\$10091=45),'Citi - Sheet1'!\$E\$2:\$E\$10091))

Thanks,
Yosef

### Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

#### Aladin Akyurek

##### MrExcel MVP
My formula works when I use only one criteria but when I include an and with a second criteria it doesnt work - any idea why?

This one works:
=MIN(IF('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,'Citi - Sheet1'!\$E\$2:\$E\$10091))
and this one works
=MIN(IF('Citi - Sheet1'!\$D\$2:\$D\$10091=45,'Citi - Sheet1'!\$E\$2:\$E\$10091))

but when I combine these 2 criteria I get 0 - which is incorrect
=MIN(IF(AND('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,'Citi - Sheet1'!\$D\$2:\$D\$10091=45),'Citi - Sheet1'!\$E\$2:\$E\$10091))

Thanks,
Yosef

Control+shift+enter...

=MIN(IF('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,IF('Citi - Sheet1'!\$D\$2:\$D\$10091=45,'Citi - Sheet1'!\$E\$2:\$E\$10091)))

thanks.

#### nisselyo

##### Board Regular
It worked like a charm - thanks. One follow up question
Im looking up the lowest rate with tose variables. my next issue is that some of the rates have a cost (which is the net column over) of #n/a. Is there a way to find the minimum with these criteria - but fotr where the cost is a number and not this error?
Thanks,
Yosef

#### Aladin Akyurek

##### MrExcel MVP
It worked like a charm - thanks. One follow up question
Im looking up the lowest rate with tose variables. my next issue is that some of the rates have a cost (which is the net column over) of #n/a. Is there a way to find the minimum with these criteria - but fotr where the cost is a number and not this error?
Thanks,
Yosef

Assuming that 'Citi - Sheet1'!\$E\$2:\$E\$10091 might contain #N/A...

Control+shift+enter:

=MIN(IF('Citi - Sheet1'!\$C\$2:\$C\$10091=B107,IF('Citi - Sheet1'!\$D\$2:\$D\$10091=45,IF(ISNUMBER('Citi - Sheet1'!\$E\$2:\$E\$10091),'Citi - Sheet1'!\$E\$2:\$E\$10091))))

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Threads
1,164,623
Messages
5,838,422
Members
430,546
Latest member
CometOz

### 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

### 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