Changing letter entries into numbers

RADICAL_THOUGHT

New Member
Joined
Aug 30, 2024
Messages
11
Office Version
  1. 365
Platform
  1. Windows
hello,

the letters N,D,L,E,P are shifts, I want to be able to type these letters in the blank cells and get numbers in place of the letters.

so when I type in 'N' I want it to show in the cell as '12' with the same background colour.

TIA
Rota Screenshot.png
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
CURRENTLY I HAVE CONDITIONALLY FORMATTED IT SO THAT WHEN I TYPE 'N' IT COMES UP AS 'N' BUT WITH THE BACKGROUND COLOUR.

'N' = 12
'E' = 9
'D' = 12
'L' = 9
'P' = 9
 
Upvote 0
OK, see if this small example works sufficiently as you want. If so you can apply it to a larger range and for other letters. I have just done cell G4 and only for the letter "D"

24 08 30.xlsm
FGH
3
412
5
Letter-Number
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G4:N4Expression=G4="D"textNO


In the Conditional Formatting set-up as well as the fill colour I have used this on the 'Number' tab.

1725020779322.png


.. and looking at my sheet when G4 is selected you can still see "D" in the formula bar

1725020894812.png
 
Upvote 0
You could use

Excel Formula:
=SUM(XLOOKUP(C3:AG3, {"N";"E";"D";"L";"P"}, {12;9;12;9;9},0,0))

Or adjust the range as necessary.
 
Upvote 0
You're welcome. Glad we could help.

BTW, for the future please note #14 of the Forum Rules which asks you not to post in all upper case. :)
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,043
Members
452,542
Latest member
Bricklin

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