Text to Number Value.

M

mseifert_99

I have a spread sheet that has a several columns with a text Value of
"None", Slight/Moderate", "Severe". What I want to do is create a Macro
or something that if it sees say a Cell with "Severe" in it it will
change the Cell value to 0
 
P

Pete

You can do this with Find & Replace. Highlight the cells or columns
where you want to make this change, then click Edit | Replace (or just
do CTRL-H). In the panel that pops up you should enter "Severe"
(without the quotes) in the Find What box, enter 0 in the Replace With
box and then click Replace All.

Hope this helps.

Pete
 
H

hansyt

Try this:

original lookup
code number code number
None 1 Slight/Moderate 2
Severe 0 None 1
Slight/Moderate 2 Severe 0

Your table of codes/numbers in A3:B5
The values you want to translate in e.g. D3:D5
In E3 enter:
=IF(ISNA(VLOOKUP(D3;$A$3:$B$5;2;FALSE));"???";VLOOKUP(D3;$A$3:$B$5;2;FALSE))
Copy down as required

That will translate any code that is in the table to the accorsing
number.

Hans

Sorry for the crap formatting above
 
Top