array formula using 2 criteria

nisselyo

Board Regular
Joined
Jun 20, 2007
Messages
61
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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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)))
 
Upvote 0
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
 
Upvote 0
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))))
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,132
Members
448,947
Latest member
test111

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