Index or Xlookup 2 criteria, but 1 of them includes >=

amyj22x3

New Member
Joined
Jul 24, 2018
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I need to find a way to match the Agent Type and ACHIEVED goal in a different sheet, but the payouts are as follows:

The problem is most of the time an agent hits their goal, but their achieved goal falls between 2 target goal tiers. So the problem is their achieved goal is 6,600 I need the returned incentive to be 100 since they didn't make it to the 2nd tier of 7,000

I've tried all combinations of index(match, vlookup, xlookup and so on, but because I have to match the Agent Type exactly, but the Goal approximately I can't get the right answer.

Agent TypeGoal TargetIncentive
1 MO6,500100
1 MO7,000110
Agent26,000200
Agent29,000300
Sr. Agent27,000250
Sr. Agent29,000300
 

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.
The Description is a little bit confusing, but XLOOKUP has a match mode argument. So, without references it could look like: =XLOOKUP(goal target value&agent type value,goal target range&agent type range;incentive range,,-1). The -1 argument will return exact match or next smallest match, or 6,500 if you goal target value is 6,600.
 
Upvote 0
What version of excel are you using? Please update your profile here so that the version of excel you use shows up on your posting button? (See how 365 is under my button on the left?)
 
Upvote 0
What version of excel are you using? Please update your profile here so that the version of excel you use shows up on your posting button? (See how 365 is under my button on the left?)
Updated, I'm using 365.
 
Upvote 0
The Description is a little bit confusing, but XLOOKUP has a match mode argument. So, without references it could look like: =XLOOKUP(goal target value&agent type value,goal target range&agent type range;incentive range,,-1). The -1 argument will return exact match or next smallest match, or 6,500 if you goal target value is 6,600.
Apologies. Yeah, I tried using the -1 at the end of the xlookup, but it still didn't work.
 
Upvote 0
Could you elaborate more on what you are trying to calculate?
 
Upvote 0
Could you elaborate more on what you are trying to calculate?
I calc sales incentives on a monthly basis. For the last couple of years I've used a nested If(and formula to look at the Agent Type and their sales (achieved goal points), but my boss can't understand the formula, so he's forcing me to change it. The table below shows what they'll earn if they achieve each Target Goal, however because life is life, their sales are never going to be exact to the Goal Target tiers. The Agent Type matches perfect, but if Agent A who is a 1 MO agent gets 6,600 then their Incentive Payout should be 100, not 110.

Agent TypeTarget Goal Incentive
1 MO6,500100
1 MO7,000110
Agent26,000200
Agent29,000300
Sr. Agent27,000250
Sr. Agent29,000300
 
Upvote 0
try this:
Book1
ABCDEF
1Agent TypeTarget GoalIncentiveAgent Type:1 MO
21 MO6,500100Sales6,600
31 MO7,000110Incentive:100
4Agent26,000200
5Agent29,000300
6Sr. Agent27,000250
7Sr. Agent29,000300
Sheet2
Cell Formulas
RangeFormula
F3F3=LET(vl,FILTER($A$2:$C$7,$A$2:$A$7=$F$1,""),s,CHOOSECOLS(vl,2),I,CHOOSECOLS(vl,3), XLOOKUP($F$2,s,I,"",-1))
Cells with Data Validation
CellAllowCriteria
F1List=$A$2:$A$7
 
Upvote 0
try this:
Book1
ABCDEF
1Agent TypeTarget GoalIncentiveAgent Type:1 MO
21 MO6,500100Sales6,600
31 MO7,000110Incentive:100
4Agent26,000200
5Agent29,000300
6Sr. Agent27,000250
7Sr. Agent29,000300
Sheet2
Cell Formulas
RangeFormula
F3F3=LET(vl,FILTER($A$2:$C$7,$A$2:$A$7=$F$1,""),s,CHOOSECOLS(vl,2),I,CHOOSECOLS(vl,3), XLOOKUP($F$2,s,I,"",-1))
Cells with Data Validation
CellAllowCriteria
F1List=$A$2:$A$7
 
Last edited:
Upvote 0
The LET function allows you to use temporary names for references.

=LET(vl,FILTER($A$2:$C$7,$A$2:$A$7=$F$1,""),s,CHOOSECOLS(vl,2),I,CHOOSECOLS(vl,3),
XLOOKUP($F$2,s,I,"",-1))

The syntax of LET is pairs of arguments followed by a final single argument.
The odd number in sequence arguments are the assigned names (or in the last case a final calculation).
The even number in sequence arguments are the formulas that are assigned to the assigned name.

the vl is the filtered data, filtering columns A:C for the agent type selected in cell F1
s the s is the 2nd column of the filtered data (gets the filtered sales column for what ever agent type is in cell F1.
the l is the 3rd column of the filtered data (gets the incentive column for the agent type)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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