# Finding the minimum based on two criteria but one of them is Variable.

#### smalik

##### Board Regular
Various insurance policies are prioritized in this order.

Many owners have only handful policies. What is the best way to find the earliest month their policy is effective based on the above criteria?
For example,
1. YOUNED1 has two Auto policies. Since this is the first criteria it should look for the earlier effective policy month based on Auto and YOUNED1. The result should be March (3)
2. GENNTH1 does not have an Auto policy so formula should automatically look for the next item on the list which is EXFL. In this case since there is only one EXFL policy, the result should be Dec (12)
Can this be done without writing a VBA code? It can be done using multiple columns.
I started thinking about "vlookup" as first step but then I got lost

Any help is greatly appreciated.

### Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},\$Z\$1:\$Z\$99,\$Y\$1:\$Y\$99),2,False) to lookup Y values to left of Z values.

#### smalik

##### Board Regular
Never mind. I figured it out using the MINIFS twice

Replies
7
Views
137
Replies
6
Views
245
Replies
0
Views
143
Replies
3
Views
330
Replies
8
Views
432

1,136,792
Messages
5,677,759
Members
419,718
Latest member
ALWP

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

### Which adblocker are you using?

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

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