+ Reply to Thread
Results 1 to 5 of 5

Regular Expression with date

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Regular Expression with date

    Hello All.
    I try to deal with my problem but without any results. I wrote code:
    Please Login or Register  to view this content.
    I try to get a date from a cell in format dd/mm/yyyy. But I have problem with pattern. Please provide me well pattern.
    (*) Reputation points appreciated.
    excelbs.tk

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Regular Expression with date

    Try:
    Please Login or Register  to view this content.
    The Global property is set to False by default, so no need to include.

    Cheers,
    berlan

    EDIT: added code sample, in addition to a RegEx pattern
    Last edited by berlan; 07-15-2015 at 06:42 AM.

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Re: Regular Expression with date

    Berlan thank you for response but neither my nor your pattern doesn't work. Lets look at example of cell:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Regular Expression with date

    michson, with the revised DateFromCell function I posted above, this is the result I get

    Row\Col
    A
    1
    RNB 9/1/2015 21,036.67 1,945.59
    2
    9/1/2015

    A2: =DateFromCell(A1)
    Last edited by berlan; 07-15-2015 at 06:50 AM.

  5. #5
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Re: Regular Expression with date

    Berlan thank you very much. Appreciation point goes to you
    My second question concerns how to get off rest of numbers like in example 21,036.67 and 1,945.59. I tried this code and pattern:
    Please Login or Register  to view this content.

+ 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. Backreferencing In VBA Regular expression
    By BS Singh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2014, 11:46 PM
  2. Regular expression
    By Gourav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 03:23 PM
  3. regular expression for password
    By Gourav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2014, 04:05 PM
  4. [SOLVED] Regular Expression Pattern
    By goss in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2013, 11:36 AM
  5. [SOLVED] Regular Expression
    By Kvramana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 05:32 AM
  6. regular expression in vba is not working
    By johnmerlino in forum Excel General
    Replies: 2
    Last Post: 07-07-2011, 06:19 PM
  7. Regular Expression in Excel?
    By terrence_chan99 in forum Excel General
    Replies: 3
    Last Post: 01-08-2007, 10:55 PM

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