Name

  • Thread starter Thread starter acsell
  • Start date Start date
A

acsell

Hi, I need to use Name to define 3 discount rates. This needs to be done
so that when the user of the spreadsheet enters "discount 1" it gives a
value of 10%, "Discount 2" gives a value of 12% and "Discount 3" gives
a value of 17.5%.

Using Name I have managed to get it so that they enter for example "
=Discount_1 " it gives a value of 10% but I want it so that when they
enter "Discount 1" they get 10%.
 
Do you need to make a calculation then use

=VLOOKUP(A1,{"Discount 1",0.1;"Discount 2",0.12;"Discount 3",0.17},2)

if you need text that says 10% just for information use

=TEXT(VLOOKUP(A1,{"Discount 1",0.1;"Discount 2",0.12;"Discount
3",0.17},2),"0%")

for usabily reasons you might want to validate the cell so they can't
enter Discount1 or something also you might want to dodge the error if A1
(input cell) is blank

=IF(A1="","",TEXT(VLOOKUP(A1,{"Discount 1",0.1;"Discount 2",0.12;"Discount
3",0.17},2),"0%"))

just adapt the same thing for the first formula
 
Assume you enter discount 1 in a1

=Choose(Match(A1,{"Discount 1","Discount 2","Discount 3"},0),.10,.12,.175)
 
Back
Top