+ Reply to Thread
Results 1 to 2 of 2

TextToColumns Problem - Column Data Format

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Leeds, England
    MS-Off Ver
    MS Office 2007
    Posts
    134

    TextToColumns Problem - Column Data Format

    Hi All,

    I have a macro that converts a text file into an excel file. The original data looks something like this.

    Differences (11 Feb 2009 13:23)
    Found in S1 not S2:
    XXXXXXX,01/02/2009
    XXXXXXX,03/04/1997
    XXXXXXX,05/06/1962
    XXXXXXX,23/04/1944
    XXXXXXX,11/01/1977
    XXXXXXX,08/12/1989

    Found in S2 not S1:
    XXXXXXX,23/01/2009
    XXXXXXX,23/01/1997
    XXXXXXX,23/01/1962
    XXXXXXX,23/01/1944
    XXXXXXX,23/01/1977
    XXXXXXX,23/01/1989
    XXXXXXX,23/01/2009
    XXXXXXX,23/01/1997
    XXXXXXX,23/01/1962
    XXXXXXX,23/01/1944
    XXXXXXX,23/01/1977
    XXXXXXX,23/01/1989


    Part of this macro has this code:

    Please Login or Register  to view this content.
    Some dates are coming out wrong e.g. if date in text file looks like 03/04/2008, it will be shown in the final document i.e. after the macro as 04/03/2008.

    I 'think' that this may be due to the option that you can choose with TextToColumns called Column Data Format. If I do this manually and use "TEXT" it all looks fine. Can this be built into my VB code?

    If it is not this problem can anyone suggest what it could be?

    Thanks!
    dvent

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: TextToColumns Problem - Column Data Format

    Perhaps try:

    Please Login or Register  to view this content.

+ 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