View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Bundy John Bundy is offline
external usenet poster
 
Posts: 772
Default Extracting Numbers froma Text String

I can get all of the numbers up to the text through code, and i can parse out
A and B but i have to know how to tell where c2 and d2 seperate, how can i
tell if c is 5 digits and d is 1 digit or whether c is 3 digits and d is 3
digits?
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Jules" wrote:

Thanks John, so much for answering.

The first ten in A2 are consistent, B2 is consistent, c2 can be from two to
five digits and d2 can be from 1 to three.

I've extracted all but the one I need which is a quantity...one to 400...

So, with what is left the first order would be the first 2-4 numbers and
then (what I need) the one to three number I need right next to the text
string.

Does that answer everything?

Thanks for the help.
--
Jules


"John Bundy" wrote:

A couple questions I need answered first, you show values from A2,B2 etc, do
these numbers have meaning? Are they always the same length. Is there a
consistent amount of numbers before the first letter? and finally you say
there could be up to 3 numbers that you need, how do you know how many you'll
need?
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Jules" wrote:

Hi...I have a problem I've been working on for a while now...to no avail.

a2=200865346120565131TED STOCK THIGH HIGH XL 3922

I'm managed to get to

a2=2008653461
b2=20565
c2=13
d2=131ted stock thigh high xl 3922
e2=ted stock thigh high xl 3922

Problem is D2 - I need the one after the three...

It is not consistent in the database...

But what is consistent is I need the one right before the text begins (some
times it may be up to three numbers) all located before the text.

Any help would be great!

Thanks
jules
01.20.09

--
Jules