Reading a text string charachter by charachter....convert string to number

C

ChuckM

I have a text string that contains an age range...:

text_string(1)= 6 - 10
text_string(2) = 11 - 13
text_string(3) = 14 +


I also have an age variable (integer) that I need to assign to an age
group.

e.g.

age = 12
so I need to map this to text_variable(2).

I believe that I can do this if I can read eaxh charachter of the
string...if someone can tell me how to do this.... or is there an
easier way?

Thanks
ChuckM
 
G

Guest

I'm not sure exactly what you are trying to do but if you
need to interrogate the text within a cell lookup these
worksheet functions in help:
Left
Right
Mid
Search

One or more of them may provide your solution.
 
B

Bernard Liengme

Hi Chuck,
If the text 6 - 11 is in B2 then the formula =LEFT(B2,LEN(B2)-FIND("-",B2))
will give you the 6 as a number.
Any help?
 

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