IF and VLOOKUPS together

donnarowbo

New Member
Joined
Jul 19, 2016
Messages
3
Hi

Please can someone help me with the following:

I'm developing an excel based calculator that will return different results depending on how an entry compares to a vlookup result.

I.e:
If the value in cell E13 is less than the vlookup value returned, minus 5%, return "RED"
If the value in cell E13 is less than the vlookup value returned, minus 1%, return "AMBER"
If the value in cell E13 is greater than the vlookup value returned, return "RED"

For the life of me I can't get it to work.

Thanks in advance

Donna
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Sorry.... amended


I.e:

If the value in cell E13 is less than the vlookup value returned, minus 5%, return "RED"
If the value in cell E13 is less than the vlookup value returned, minus 1%, return "AMBER"
If the value in cell E13 is greater than the vlookup value returned, return "GREEN"
 
Upvote 0
I assumed you wanted GREEN if E13 was Equal to or greater than vlookup-1%

Try
=LOOKUP(E13,VLOOKUP(.....)*{0,0.95,0.99,1.01},{"RED","AMBER","GREEN","RED"})
 
Upvote 0
If the value in cell E13 is less than the vlookup value returned, minus 5%, return "RED"
If the value in cell E13 is less than the vlookup value returned, minus 1%, return "AMBER"
If the value in cell E13 is greater than the vlookup value returned, return "GREEN"

You're still missing one range...
BETWEEN (vlookup value returned, minus 1%) AND (Vlookup Value Exactly.)
 
Upvote 0
Sorry.... amended


I.e:

If the value in cell E13 is less than the vlookup value returned, minus 5%, return "RED"
If the value in cell E13 is less than the vlookup value returned, minus 1%, return "AMBER"
If the value in cell E13 is greater than the vlookup value returned, return "GREEN"

Try something along the lines of

=IF(E13<(vlookup fomula - (vlookup formula*.05)),"RED",IF(E13<(vlookup formula - (vlookup formula*.01)),"AMBER",IF(E13>vlookup formula,"GREEN","")))

Edit: Jonmo's is better than mine, I don't even know if this would work...
 
Last edited:
Upvote 0
Edit: Jonmo's is better than mine, I don't even know if this would work...
I'm sure it would have worked fine (to the OP's description anyway)

FYI
vlookup fomula - (vlookup formula*.05)
Is the same as
Vlookup formula * 0.95
 
Upvote 0

Forum statistics

Threads
1,217,087
Messages
6,134,485
Members
449,874
Latest member
Cl2130

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