[EXCEL] - Assign a numeric value to a word
Stev28fr
-
Stev28fr -
Stev28fr -
Hello,
I can't find the formula...
The problem is I have two columns, one with a drop-down list containing 4 values (R, S1, S2, S3) and assigned a numerical value (1, 2, 3, 4) that is displayed in the cell based on the selection.
Thank you for your help!
I can't find the formula...
The problem is I have two columns, one with a drop-down list containing 4 values (R, S1, S2, S3) and assigned a numerical value (1, 2, 3, 4) that is displayed in the cell based on the selection.
Thank you for your help!
5 réponses
Good evening
several options:
1°) formula with condition, for a text in A2, formula in B2:
=IF(A2="R",1,IF(A2="S1",2,IF(A2="S3",3,IF(A2="S4",4,""))))
or, if your values are actually 1,2,3,4
write in Z1: R in Z2 S2; in Z3:S3 in Z4:S4
and the formula is:
=IFERROR(MATCH(A2,$Z$1:$Z$4,0),"")
best regards
The quality of the answer mainly depends on the clarity of the question, thank you!
several options:
1°) formula with condition, for a text in A2, formula in B2:
=IF(A2="R",1,IF(A2="S1",2,IF(A2="S3",3,IF(A2="S4",4,""))))
or, if your values are actually 1,2,3,4
write in Z1: R in Z2 S2; in Z3:S3 in Z4:S4
and the formula is:
=IFERROR(MATCH(A2,$Z$1:$Z$4,0),"")
best regards
The quality of the answer mainly depends on the clarity of the question, thank you!