Reputation: 17
I would like to have a list of values in one cell, while when the user looks at it shows text, and when I read this cell I will have a number.
Example:
In cell: A1:
, list of options are: TCP, UDP
, where TCP=0, UDP=1
I will do in another cell "=A1+4"
, I will get either 0
or 1
from A1 plus 4
Upvotes: 0
Views: 631
Reputation: 19792
Use a custom number format of [=1]U\DP;[=0]TCP
A1
.[=1]U\DP;[=0]TCP
as the Type and press OK. Now when you enter data into cell A1
you'll get:
Enter =A1+4
in another cell and it automatically picks up the format from A1
so change the format back to General
.
0
returns 41
returns 52
displays 6 in your formula cell, and ######## in A1
so may need to allow for that.Custom number formats tutorial on ExcelJet
Upvotes: 1