+ Reply to Thread
Results 1 to 6 of 6

Find 12 Hr Format date from 24 Hr Text String

  1. #1
    Forum Contributor
    Join Date
    12-25-2011
    Location
    Lahore, Punjab, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    287

    Find 12 Hr Format date from 24 Hr Text String

    I have set MyDate as Date

    MyDate = 12/17/17 07:52:52 PM

    I want to search this in following data in column A. Search result is present at cell A5.

    17 Dec 17 19:51:33 Extra Load
    17 Dec 17 19:52:09 Minimum age of 18 verified
    17 Dec 17 19:52:16 Extra Load
    17 Dec 17 19:52:47 Extra Load
    17 Dec 17 19:52:52 Minimum age of 18 verified
    17 Dec 17 19:55:32 Villaged
    17 Dec 17 20:00:10 Minimum age of 18 verified
    17 Dec 17 20:00:24 Old Relative
    17 Dec 17 20:02:32 Villaged

    Can a vba code search this 12 HR format date from 24 Hr format text data and return the row number of that cell from range.
    Last edited by caabdul; 03-03-2018 at 08:45 AM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find 12 Hr Format date from 24 Hr Text String

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Find 12 Hr Format date from 24 Hr Text String

    Try
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find 12 Hr Format date from 24 Hr Text String

    That's great Mr. Jindon
    I have used a UDF to get the months abbreviations Jan, Feb and so on because the regional settings for me is different ..Is there another way to have the English months names without a UDF ..? I mean to implement the regional settings point in your code

  5. #5
    Forum Contributor
    Join Date
    12-25-2011
    Location
    Lahore, Punjab, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Find 12 Hr Format date from 24 Hr Text String

    Thanks guys, Format Function did the trick.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find 12 Hr Format date from 24 Hr Text String

    You're welcome. Glad it worked for you
    Thanks for the rep. points

+ 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. Replies: 6
    Last Post: 10-13-2017, 03:32 PM
  2. VBA to Format Date and color it on text string
    By JSoto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2016, 11:12 AM
  3. Replies: 2
    Last Post: 04-14-2015, 04:20 PM
  4. Replies: 4
    Last Post: 03-30-2015, 03:20 PM
  5. Changing date format in a text string
    By rsmith10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2014, 09:46 AM
  6. Converting ddmmyy date format to text string
    By Fos605 in forum Excel General
    Replies: 1
    Last Post: 06-06-2008, 09:49 AM
  7. Converting Text String to Date Format
    By mccrimmon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2007, 11:09 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