Set a letter to represent a value

Mandie09

New Member
Joined
Aug 9, 2013
Messages
4
I need to be able to type in 0, S, or D into a cell and it stand for a number value such as, 0=0, S=1.5, D=3. I need to be able to change this cell to any of those 3 and it automatically change the number value. In the cells I already have =SUM(G5*H2+G2) all the way through H17. I need to be able to change G2 to either 0, S, or D and it change the value accordingly.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Another way...

=G5*H2+1.5*(SEARCH(G2,"0SD")-1)

You did not really need the SUM function call as you are already adding the numbers directly using the + sign.
 
Last edited:
Upvote 0
What does the 2,1 represent?
The 2 is the first argument to the LOOKUP function, the comma delimits the first argument from the second argument, the 1 is the numerator for the fraction that makes up the second argument to the LOOKUP function, namely this...

1/(G2={0,"D","S"})

Just out of curiosity, did you see the formula I posted in Message #3 (you may find it easier to figure out how it works)?
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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