+ Reply to Thread
Results 1 to 3 of 3

String assuming date format

  1. #1
    Registered User
    Join Date
    12-13-2006
    Location
    Memphis
    Posts
    3

    String assuming date format

    I get a CSV file from a system as part of a process where I compare the contents of the file to user accounts in active directory. The first column of the CSV file contains a user account name that will be of the format abc1234, that is, 3 characters followed by 4 integers (actually the first 3 letters of users last name plus the last 4 digits of their SSN). The problem I am having is when I import that column into my worksheet that does the processing, any account name that begins with 3 letters that represent a month abbreviation automatically get converted to a date format.

    For example, the account name may1932 is being displayed as "May-32" in the cell and shows up as "5/1/1932" in the formula bar.

    mar2077 shows up as "Mar-77", etc, etc......

    I have tried inserting an apostrophe at the front of the string but then it displays as a text version of the Excel serialized date number. Have also tried all cell formats I am aware of.

    Does anyone know a way to foce the format to be abc1234? I'm thinking the formatting issue willl need to be addressed at the point where the original CSV file is being created?????

    Thanks...
    J

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I can not help you overcome your problem of opening a the csv file in Excel and if no one else can assist you. I beleive I can overcome your problem via a macro.

    If you would like me to assist with a macro paste a small example of your csv file

  3. #3
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Change the extension of your .csv file to .txt or something.

    Excel makes assumptions when you import a .csv file. You can make your own choices if you change the extension and then go through all the import options and specify the Data Type of each column... in your case, specifying that column to be Text.

    Scott

+ 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