MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to convert text to number via formatting?


Posted by Connie on May 16, 2001 8:18 AM

I need to convert an entry of "y" (for Yes) to a numerical value, such as "1". I know I could set a formula up to do this, but I was told I could do it with formatting. I tried to customize through cell format, but maybe my syntax was wrong. Is there a way I can specify something to the effect of, "Y"="1" in the custom formatting? Any ideas appreciated.


Posted by Mark W. on May 16, 2001 8:24 AM

Connie, number formatting can be used to display
a "Y" if a value is 1...

[=1]"Y"

...but, not the other way around.