+ Reply to Thread
Results 1 to 4 of 4

Text to Column, Changing date format

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Text to Column, Changing date format

    Hi
    Does anyone know how to replicate the function in VBA. If I have a column shown in mm/dd/yyyy date format but the computer I am using reads in mm/dd/yyyy format I select the whole column and then select Text to Columns and change the date format that way and the data changes to the dd/mm/yyyy format.

    I don't want to change the computers settings.

    Thanks.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Dim Rng As Range
    Set Rng = Selection
     Rng.TextToColumns Destination:=Rng.Cells(1), DataType:=xlDelimited, _
            FieldInfo:=Array(1, 2)
    VBA Noob
    Last edited by VBA Noob; 11-24-2007 at 06:04 AM.
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Question

    Thanks, though I'm not sure how this works. Is it the array section which does the conversion, if so how does this work? Is there a sight explaining the parameters of such functions allot better than the ms help files? Thanks

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I just recorded and removed the false items so like you not sure how it works

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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