converting text numbers

G

Grace

Hello, is there a way to convert text numbers (i.e. One,
two, three) to an actual number (i.e. 1, 2, 3)?

I have an excel spreadsheet which contains survey data.
The survey allows free form entry in a field that should
be a Number data type.

Thank you for your help.
Grace
 
J

John Nurick

Hi Grace,

If the text field contains nothing but correctly-spelled numbers from 0
to about 10 or 20, e.g.
"one"
"two"
"three"
"eleven"
this isn't too difficult. For instance you can do it with a succession
of Edit|Replace operations in Excel or Access: replace "one" with 1,
"two" with 2 ... and "eleven" with 11. Alternatively you can use the
Switch() function in a calculated field in a query like this, where X is
the name of the number field:
NumField: Switch([X]="one",1,[X]="two",2,[X]="three",3)

If you need to handle values such as
"one"
"two"
"fuor"
"about 12"
"not sure"
"5-10"
"my wife knows"
"5 thousand"
things are a lot more complicated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top