Find Text Within Text

C

Cathy Landry

Hello,

We have concatenated data loaded into Oracle in att 5. I have exported this
to Excel and now need to pull out the transaction dates and put them into
another column. The data below shows what is contained in one cell and the
transaction date is the second date listed that I need pulled into a separate
cell in Excel

Any help would be appreciated!

24493989153026554078566-1_629430_198_7661_06/02/2009_06/01/2009_06/10/2009_06/16/2009_384149_2361257_3487911_72703_584423_E1C73691_4789

Thank you!
Cathy
 
M

Mike H

Hi,

It may be as simple as this if all your strings are the same length

=MID(A1,30,10)

Mike
 
C

Cathy Landry

Hi Mike,

Thank you for the super quick response!! Unfortunately, not every line will
not be the same length however the transaction date field will always be the
second date field referenced.
 
T

T. Valko

Assuming the date of interest is *always* immediately after the 5th
underscore and is *always* in the format mm/dd/yyyy.

=--MID(A1,FIND("^^",SUBSTITUTE(A1,"_","^^",5))+1,10)

Format as Date
 
M

Mike H

Hi,

Here's another stab. does it always have the same amount of underscores
before the date?

=MID(MID(MID(SUBSTITUTE(A1,"_","^",5),1,256),FIND("^",SUBSTITUTE(A1,"_","^",5)),256),2,FIND("_",MID(MID(SUBSTITUTE(A1,"_","^",5),1,256),FIND("^",SUBSTITUTE(A1,"_","^",5)),256))-2)

Mike
 
T

T. Valko

Yeah, that should work as well. I didn't think of looking for the slash in
the first date.
 

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