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
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    If you analyse the code and understand how it works it's easy to amend.

    Code:
    Sub M_snb()
          [K2:K200] = [if(B2:B200="","",if(isnumber(B2:B200),date(substitute(mid(B2:B200,search("/",B2:B200)+1,2),"/",""),right(trim(B2:B200),4),substitute(left(substitute(B2:B200,"`",""),2),"/",""),date(right(trim(B2:B200),4),substitute(mid(B2:B200,search("/",B2:B200)+1,2),"/",""),substitute(left(substitute(B2:B200,"`",""),2),"/",""))))]
    End Sub

  2. #2
    Junior Member
    Join Date
    Jun 2014
    Posts
    7
    Rep Power
    0
    snb,
    Thanks for taking time to reply me with your code. I do appreciate. The codes given by p45cal did the job.
    I may use the logic in your code, for some other purpose. Yes, no effort will go waste. I am learning and your code helps. Thanks.

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
  •