Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 was marked as an exact duplicate of an existing question.

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.


and format the cells with custom format


This will display as

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .