# Will INDEX,MATCH work for this?

#### cintirich

##### New Member
Hi all,

I am trying to come up with a formula that will look at data in 3 columns (SubscriberStatus [yes/no], MarketID [1-10], and Age [any integer 13-17]) and categorize the result into a "quota code". There are 30 quota codes. The first 10 (525 - 534) are based only on SubscriberStatus and MarketID. The rest (535 - 554) are based on all three variables.

Examples

• Quota Code 525 = Non-subscribers Market 1
• Quota Code 535 = 13-15 Year old Subscribers Market 1
• Quota Code 545 = 16-17 Year old Subscribers Market 1
• Quota Code 526 = Non-subscribers Market 2
• Quota Code 536 = 13-15 Year old Subscribers Market 2
• Quota Code 546 = 16-17 Year old Subscribers Market 2

Any ideas? Thanks!
Rich

 Age Subscriber MarketID Quota_Code 13 Yes 6 ? 15 No 7 ? 14 Yes 8 ? 17 No 5 ? 16 Yes 10 ? 13 Yes 7 ?

<tbody>
</tbody>

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### CalcSux78

##### Well-known Member

Excel 2010
ABCD
1AgeSubscriberMarketIDQuota_Code
213Yes6540
315No7531
414Yes8542
517No5529
616Yes10554
713Yes7541
Sheet1
Cell Formulas
RangeFormula
D2=IF(B2="No",524+C2,IF(A2<16,534+C2,544+C2))

#### cintirich

##### New Member
Excellent and elegant. Thanks!

Replies
1
Views
190
Replies
3
Views
98
Replies
6
Views
400
Replies
3
Views
169
Replies
14
Views
215

1,191,691
Messages
5,988,113
Members
440,126
Latest member
duque00

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