![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Microsoft office error all errors related to Microsoft office error |
![]() |
|
Remove leading zeroes from alphanumeic text string quickly.
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
Below are sample entries. 01234 converts to 1234 0001234a converts to 1234a 001234-a converts to 1234-a 101234 remains at 101234 2509398 remains at 2509398 123z remains at 123z 000002829839 converts to 2829839 Thank you. Points go to fastest application. I'll be testing with 1000 rows of data. |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
Dim lngLC As Long For lngLC = 1 To Len(stringToFix) If Mid(stringToFix, lngLC, 1) <> Left(charToRemove, 1) Then trimLeadingChar = Right(stringToFix, Len(stringToFix) - lngLC + 1) Exit Function End If Next lngLC trimLeadingChar = "" End Function |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|