+ Reply to Thread
Results 1 to 2 of 2

Excel 2013 – need help extracting date and time from text cell plus more.

  1. #1
    Registered User
    Join Date
    07-18-2014
    Location
    the great nation of Pennsyltucky
    MS-Off Ver
    2013
    Posts
    1

    Excel 2013 – need help extracting date and time from text cell plus more.

    Ok, I have two problems that I need to solve with Excel.
    I am using Excel 2013 if that helps. Anyway, the first issue is that I need to pull a date and a time period from text. So, for example, if I see something like Sunday Prime Time 7/6/14 8:37PM, I would want to pull ONLY the “7/6/14 8:37PM” out of it. Each text box could potentially be different, so it might not always be in the same format as “Sunday Prime Time 7/6/14 8:37PM” it might only show just the date and/or the time without all the extra text i.e. 7/6/14 8:37PM. Some of the cells will have text, others might only have just the time or even just the date and the time. The only thing that I am worrying about in each cell is extracting just the date and time. If this is too much to ask of excel, I would be ok with extracting ONLY the time… 8:37PM and not the date, but I would much rather be able to get both the time and date.

    THEN, onto part two of my question. After I would pull the dates and times, I need to compare them with each other. So, when I have the same date with two separate times on that date, I need to write a formula to show if those times on that date are less than 30 minutes apart. So, if I have 6 times on 7/6/14, I need to know if any of them are less than 30 minutes apart.
    I would need to have the formula say something like “Problem” if the times on 7/6/14 would be 5:30PM, 5:48PM, 7:00PM, 8:00PM, 8:15PM, and 9:00Pm for example. I would like to see the word “Problem” since 5:30PM and 5:48Pm is only 18 minutes apart, and “Problem” after 8:15PM since that is only 15 minutes past the 8:00PM which is obviously under 30 minutes. The times that are more than 30 minutes apart such as 7:00PM and 9:00PM for example are more than 30 minutes apart from any of the other times that were extracted. Does this all make sense?
    Please let me know if you need more information or if this doesn’t make sense. I really appreciate any help.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Excel 2013 – need help extracting date and time from text cell plus more.

    Try the following UDF:

    Please Login or Register  to view this content.
    If cell D9 contains:

    hfjdakjfhjh 7/6/14 8:15PM fksfhsdjfh fjshfjs

    then

    =GrabDateTime(D9)

    will display:

    7/6/14 8:15PM
    Gary's Student

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel 2013: Change text in cell based on date in another cell
    By LisaJean in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2014, 08:22 AM
  2. Simple formula to display a date (10/19/2013) as text (October 2013)
    By benyben123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2013, 03:47 AM
  3. Excel 2013 not Working on Windows 8 (Date & Time)
    By edison in forum Excel General
    Replies: 11
    Last Post: 06-23-2013, 09:59 AM
  4. [SOLVED] Date and Time issues in Excel 2013
    By sjsmith in forum Excel General
    Replies: 1
    Last Post: 01-15-2013, 03:28 PM
  5. Extracting Date/Time from 1 cell
    By jaywizz in forum Excel General
    Replies: 3
    Last Post: 08-19-2010, 09:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1