Results 1 to 4 of 4

VBA Change Date from European

Threaded View

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    Bellingham, Washington
    MS-Off Ver
    Excel 2007
    Posts
    12

    VBA Change Date from European

    Hello,

    I am writing a macro in which I need to change two columns of dates from european format to standard and change the periods to dashes. The dates currently look like 30.06.2012 and I need them to appear as 06/31/2012. In recording this change I see that I can use:

    Columns("B:B").Select
        Selection.TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
            TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
            Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
            :=Array(1, 4), TrailingMinusNumbers:=True
    but the goal is to have an extremely clean, short macro that other users can easily troubleshoot. I've been able to simplify most other functions down to one line of code. Is there a simpler way to do this?

    Thank you!
    Last edited by Cutter; 07-31-2012 at 09:36 AM. Reason: Added code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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