locked
VBA in Excel 2010 RRS feed

  • Question

  • I am looking for assistance writing a vba method/function in excel 2010 that will return cells in a column, where the cell value DOES NOT match the below regular expression.

    ^(0[1-9]|[12][0-9]|3[01])-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(19|20)\d\d$

    To be specific, I am looking for cells in a given column that DO NOT match a date format of: DD-MMM-YYYY

    where MMM is the three character month name  ex: 04-Sep-2008

    Thanks



    • Edited by John Beyler Wednesday, February 12, 2014 9:37 PM edit for correctness
    • Moved by Reed KimbleMVP Wednesday, February 12, 2014 11:01 PM OP reposted in correct forum
    Wednesday, February 12, 2014 9:01 PM

All replies

  • Hello,

    Best place to ask this question is in Excel for Developers forum.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Wednesday, February 12, 2014 9:40 PM
  • thanks. I will do that.
    Wednesday, February 12, 2014 9:47 PM