Vlookup with IF's and multiple conditions

PhantomJoe

New Member
Joined
Sep 7, 2017
Messages
22
I'm not sure why this is stumping me but I've been struggling to find the right solution to solve for the following.

I have a table of data that is used to determine cancellation percentages based on a number of factors.

The first factor is the "Position Assignment" (found in column U) and values in this column can be one of 8 values like "Direct Hire Business" and "Direct Hire Technical".

The next check is against the number of "Days Open" (column R) for the requisition. Depending on the specific Position Assignment the ranges will vary. Here's an example:
Position AssignmentDays Open% of FeeDays Open% of FeeDays Open% of Fee
Direct Hire Technical<4 Days0%5-14 Days50%15+ Days100%
FCG/LP<30 Days0%31-44 Days25%45+ Days100%

<tbody>
</tbody>




<table border="0" cellpadding="0" cellspacing="0" verdana,="" arial,="" tahoma,="" calibri,="" geneva,="" sans-serif;"="" width=""><colgroup><col></colgroup><tbody></tbody></table>



So the above table contains the logic Cancellation Fees based on Position Assignments and if it's closed within the X days then the % of Fee will be assigned based on how long the Req was open. So if it was a Direct Hire Technical and open for 9 days then the % of Fee would be 50%.

The formula I think I'm looking for would first do a lookup based on the Position Assignment and then check the Days Open column to see what range it falls in then assign the % of Fee based on those 2 factors.

Is this doable with an if/vlookup formula?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
@ PhantomJoe

Try to re-arrange the look up table you have as follows:

Row\Col
A​
B​
C​
D​
E​
F​
G​
1​
Position AssignmentDays Open% of Fee
2​
Direct Hire Technical
4
5​
15
0%
50%
100%
3​
FCG/LP
30
31
45
0%
25%
100%

This table is easier to use as shown below:

Row\Col
A​
B​
C​
5​
Direct Hire Technical
2​
0​
6​
Direct Hire Technical
4​
0​
7​
Direct Hire Technical
7​
0.5​
8​
FCG/LP
32​
0.25​
9​
FCG/LP
50​
1​
10​
FCG/LP
20​
0​

In C5 enter (and copy down for other pairs of look up values)...

=IFNA(LOOKUP($B5,INDEX($B$2:$D$3,MATCH($A5,$A$2:$A$3,0),0),INDEX($E$2:$G$3,MATCH($A5,$A$2:$A$3,0),0)),0)

If you get a #NAME ? error, replace IFNA with IFERROR.
 
Upvote 0
@ PhantomJoe

Try to re-arrange the look up table you have as follows:

Row\Col
A​
B​
C​
D​
E​
F​
G​
1​
Position AssignmentDays Open% of Fee
2​
Direct Hire Technical
4
5​
15
0%
50%
100%
3​
FCG/LP
30
31
45
0%
25%
100%

<tbody>
</tbody>


This table is easier to use as shown below:

Row\Col
A​
B​
C​
5​
Direct Hire Technical
2​
0​
6​
Direct Hire Technical
4​
0​
7​
Direct Hire Technical
7​
0.5​
8​
FCG/LP
32​
0.25​
9​
FCG/LP
50​
1​
10​
FCG/LP
20​
0​

<tbody>
</tbody>


In C5 enter (and copy down for other pairs of look up values)...

=IFNA(LOOKUP($B5,INDEX($B$2:$D$3,MATCH($A5,$A$2:$A$3,0),0),INDEX($E$2:$G$3,MATCH($A5,$A$2:$A$3,0),0)),0)

If you get a #NAME ? error, replace IFNA with IFERROR.

This worked perfectly. All I had to do was replace the IFNA with IFERROR and it worked like a charm. Thank you so much!
 
Upvote 0
I'm not sure why this is stumping me but I've been struggling to find the right solution to solve for the following.

I have a table of data that is used to determine cancellation percentages based on a number of factors.

The first factor is the "Position Assignment" (found in column U) and values in this column can be one of 8 values like "Direct Hire Business" and "Direct Hire Technical".

The next check is against the number of "Days Open" (column R) for the requisition. Depending on the specific Position Assignment the ranges will vary. Here's an example:
Position AssignmentDays Open% of FeeDays Open% of FeeDays Open% of Fee
Direct Hire Technical<4 Days0%5-14 Days50%15+ Days100%
FCG/LP<30 Days0%31-44 Days25%45+ Days100%

<tbody>
</tbody>
Hi!

Another table format and with OFFSET function.

If is possible the table format of the range A1:D7, then the formula below can help you:

=IFERROR(LOOKUP($R2,N(OFFSET($B$1,{1;3;5},MATCH($U2,$B$1:$D$1,0)-1)),
N(OFFSET($B$1,{2;4;6},MATCH($U2,$B$1:$D$1,0)-1))),0)



ABCDEQRSTUVWX
1
Direct Hire TechnicalFCG/LPDirect Hire Business

Days Open

Position Assignment
% of Fee
2Days Open000

32

Direct Hire Business
0,1
3% of Fee0,010,020,03

2

Direct Hire Technical
0,01
4Days Open53110

18

Direct Hire Technical
1
5% of Fee0,50,250,1

13

Direct Hire Business
0,1
6Days Open154550

11

Direct Hire Technical
0,5
7% of Fee111

30

FCG/LP
0,02
8





43

FCG/LP
0,25
9





27

Direct Hire Business
0,1
10





47

FCG/LP
1
11





8

Direct Hire Technical
0,5
12





23

FCG/LP
0,02
13





46

Direct Hire Technical
1
14





43

FCG/LP
0,25
15





39

Direct Hire Technical
1
16





48

Direct Hire Business
0,1
17





21

FCG/LP
0,02
18





20

Direct Hire Business
0,1
19





41

Direct Hire Business
0,1
20





5

FCG/LP
0,02
21












*****************************************************************************************************************

<tbody>
</tbody>


Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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