How to retrieve certain char within a string?

G

Guest

In cell A1, there is a string "Updated: 2007-06-29 15:45(3)"
If the string in cell A1 contains the key word "Updated", then
retrieve the date "2007-06-29" in cell B1.
Does anyone have any suggestions?
Thank in advance for any suggestions
Eric
 
T

T. Valko

Try this:

Assuming the date is *always* in this format: yyyy-mm-dd and that "Updated"
(if present) is *always* at the beginning of the string:

=IF(LEFT(A1,7)="Updated",DATEVALUE(MID(A1,10,10)),"")

Format as 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