Results 1 to 10 of 11

Thread: To change Date format in a disorderly column

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    7
    Rep Power
    0
    Quote Originally Posted by snb View Post
    Code:
    Sub M_snb()
        [K2:K200] = [if(B2:B200="","",if(isnumber(B2:B200),B2:B200,date(right(trim(B2:B200),4),substitute(mid(B2:B200,search("/",B2:B200)+1,2),"/",""),substitute(left(substitute(B2:B200,"`",""),2),"/",""))))]
    End Sub
    Thanks for the quick reply.
    It changes dates into numbers. Afterwards I formatted the cells manually as DD/MM/YYYY.
    After 31/1/2011, the date 02/01/2011 remains as it is. It should be changed as 01/02/2011.
    Similarly, after 09/02/2011, the date 02/10/2011 remains as it is. It should be changed as 10/02/2011.
    Last edited by pmich; 06-09-2014 at 04:23 PM.

Similar Threads

  1. Replies: 4
    Last Post: 02-03-2014, 07:01 PM
  2. How To Change Date Based On Time Using Formula
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 4
    Last Post: 08-03-2013, 11:03 PM
  3. date format
    By Safal Shrestha in forum Excel Help
    Replies: 1
    Last Post: 01-02-2013, 02:53 PM
  4. How To Change Date Format in Excel
    By Oh!Calcutta in forum Excel Help
    Replies: 1
    Last Post: 11-01-2012, 09:36 PM
  5. Convert Text In YYYYMMDD Format To Date Format
    By S M C in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 02-28-2012, 12:04 AM

Posting Permissions

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