If and vlookup questions - I think

snowy3uk

New Member
Joined
May 30, 2005
Messages
7
In one cell (let's call it A1) I have a list with three values - "Non Std", "Vacant", "Let"
In cell A2 a value will be entered - any number between 0 and 5000000
Cell A3 sets a discount depending on both the value selected in A1 and the number in A2 but:
If the A1 = "Non Std" then depending on the value in A2 the value in A3 is taken from column 2
Non Std
<2500000
>250000 and <400000-10
>400000 and <750000-15
>750000-20
If A1 = "Let" then depending on the value in A2 the value in A3 is taken from column 2
Let
<2500000
>250000 and <500000-5
>500000 and <1000000-10
>1000000-15
If A1 = "Vacant then depending on the value in A2 the value in A3 is taken from column 2
Vacant
<5000000
>500000-10
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hey Snowy, please try this:

I created 3 named ranges called NonStd, Let, and Vacant. I created 2 formulas to help find the values.

Book1
ABCDEFGHIJKL
1Non StdNon StdLetVacant
210,000,000000000
30.5250,001-10250,001-5500,001-10
4400,001-15500,001-10
5Choice:2-20750,001-201,000,001-15
Sheet2
Cell Formulas
RangeFormula
B5B5=IF(A1="Non Std",2,IF(A1="Let",3,IF(A1="Vacant",4,1)))
C5C5=CHOOSE(B5,A3*A2,VLOOKUP(A2,Non_Std,2,TRUE),VLOOKUP(A2,Let,2,TRUE),VLOOKUP(A2,Vacant,2,TRUE))
Cells with Data Validation
CellAllowCriteria
A1ListNon Std,Let,Vacant
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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