pulling certain data out of a cell

D

D richardson

I have a cell that contains l1931-06-05l73lyrs
I want to be able to pull off just the 73, is this possible
 
J

JulieD

Hi

if your data is consistent with the example then you can use
=MID(A1,13,2)
or alternatively try
=MID(A1,FIND("l",A1,3)+1,2)
(with your data in A1)
 
G

Guest

Hi
It depends on the criteria you are using and how similar the information is
to your example. TO get 73 from the cell content you posted you could use:
=MID(A2,13,2)
which start at the 13th character and returns the next 2
 
J

Jason Morin

Try:

=SUBSTITUTE(RIGHT(A1,LEN(A1)-12),"lyrs","")*1

Assuming the format is always:

lyyyy-mm-ddl"age"lyrs

HTH
Jason
Atlanta, GA
 
P

patrick

This works if all your data is the same length. =MID(A1,13,2). Start at 13th
character, return 2=73.
Good Luck
Pat
 
D

D richardson

Thanks...Your right that worked assuming the length is always the same in
some instances the lyyyy-mm-ddl is missing and you are left with ll45lyrsl,
the lyrsl is a constant... is there a way to pull off from the right after
the 5 characters lyrsl.
 
D

D richardson

Thanks, your second suggestion worked for me with a slight adjustment
changing the 3 to a 2. Thanks again.
 
Top