Share via

EXTRACT TIME FROM TEXT

Anonymous
2019-09-06T18:06:29+00:00

Hello everyone,

I am having a problem here and I would really appreciate your help.

I want to extract a certain value from a text , which is time (00:00).

E.x. Tom goes to school at 07:00 o'clock

e.x.2  07:00 is the time that Tom goes to school

I give two examples because the time value is not situated in the same place at all rows. The value I want to isolate is 07:00 in this example.

How can I extract only the time info in a side column(or even same) column???

Thank you!!!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2019-09-06T18:35:09+00:00

Hi,

Use below formula:

=VALUE(LEFT(RIGHT(A2,LEN(A2)-MIN(FIND({1,2,3,4,5,6,7,8,9,0},LOWER(A2)&1/17))+1), AGGREGATE(15,6,FIND(LOWER(CHAR(ROW(65:90))),RIGHT(A2,LEN(A2)-MIN(FIND({1,2,3,4,5,6,7,8,9,0},LOWER(A2)&1/17))+1)),1)-2))

Format column B as time hh:mm

Hope this helps.

Regards,

IlirU

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Ashish Mathur 102K Reputation points Volunteer Moderator
    2019-09-07T00:11:55+00:00

    Hi,

    Given the data showing the screenshot below, in range B2:B3, I typed '07:00 and '06:30.  I select B2:B4 and went to Data > Flash Fill.

    Hope this helps.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-09-09T09:08:30+00:00

    Hi aggelikikos,

    Have you referred to the reply provided by Advisor above? Please let us know if you still need any further help.

    Regards,

    Waqas Muhammad

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-09-07T09:28:27+00:00

    Yes Rohn007, you have right. Maybe it is better to use MID function. In this case I created this formula:

    =TIME(MID(SUBSTITUTE(TRIM(A2)," ",""),FIND(":",SUBSTITUTE(TRIM(A2)," ",""))-2,2), MID(SUBSTITUTE(TRIM(A2)," ",""),FIND(":",SUBSTITUTE(TRIM(A2)," ",""))+1,2),)

    This formula ignore spaces made by rush or mistake (see the image above). For sure, cells in column B must be formatted as time (hh:mm).

    Thanks and regards,

    IlirU

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-09-06T20:11:02+00:00

    I used the Mid() function

    =TRIM(MID(A1,(SEARCH(":",$A$1)-2),2)&MID(A1,(SEARCH(":",$A$1)),3))

    Was this answer helpful?

    0 comments No comments