Results 1 to 10 of 10

Editing string based on length

Threaded View

  1. #1
    Registered User
    Join Date
    09-01-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    Editing string based on length

    Good morning, please see spreadsheet below. I get all my results from a CSV file. This isn’t a problem except for the first nine days of the month where excel cuts off the first 0 so 01012009 reads 1012009 and cannot be properly concatenated.

    Date Name Item
    1012009 Bob Keyboard
    1012009 Sid Mouse
    1012009 Dave Monitor
    1012009 Ed Monitor
    1012009 Andrew Keyboard
    1012009 Dan Keyboard
    1012009 Bruce Keyboard

    What I would like to do is have VB read the contents of the date cell and if it is less than eight characters, edit the cell by adding a zero at the beginning of the string. This needs to be a one off process for all cells. Can anyone come up with code that might make this happen? Thanks, 0nyx
    Last edited by NBVC; 09-01-2009 at 01:36 PM.

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