Hi, I have requirement where if the record are 1,15,201...then the output should be 1,15,501....that is if the number is 3 digit then the 1st digit needs to be changed to 5.
Please suggest....
Thanks...
Modify the 1st digit
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Something like
Code: Select all
svYourNumLen = len(yourNum)
If svYourNumLen >= 3 Then yourNum[1,svYourNumLen-3] : '5' : yourNum[yourNumLen - 2, 2] Else yourNum