Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

The cell should show 1M (1 month) and have the value of 30 (days) for computation. What is the best way to do so?

I typed in the cell 1M and then went to

Home-> Conditional Formating-> New rule-> Format only cells that contain -> Format only cells with SPECIFIC TEXT containing =A2=30. Then I clicked on FORMAT-> Number-> Custom-> General-> OK-> OK

...but it doesn't change anything.

Could you please help?

share|improve this question

marked as duplicate by Dave, Renan, Tog, 8088, oKtosiTe Mar 25 '13 at 17:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

I think you may have to change your approach slightly; Keep the value on screen as 1M, but when your code references that cell, stick in an if else statement to be able to consume days.

=IF(A1="1M", "30",)
share|improve this answer

For values up to 360 you can do it the other way round. Enter the number value into the cell, e.g.

30
60
90
etc.

and format the cells with custom format

m\M

This will display as

1M
2M
3M
etc
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.