Results 1 to 7 of 7

Macro to remove Leading 0s

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-07-2008
    Location
    sCOTLAND
    MS-Off Ver
    Office 2003 SP3
    Posts
    256

    Macro to remove Leading 0s

    I have been using the below code to remove all my leading 0s, I have now run into a little problem.

    The problem i have is once i have ran this macro to remove the leading 0s it auto formats the cells to numbers and one of my spread sheets is not picking up the numbers, is there away to adjust this code so i keep the original text format for my column?


    Sub ptest() 
    With Sheets("Sheet1").Columns("A:A")
     .NumberFormat = "0"
     .Value = .Value
     End With
     End Sub
    Last edited by JimmiOO; 10-27-2011 at 11:04 AM.

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