How do I remove text from a string "MIC-CT-001", and convert the remaining numbers as an Integer, where I can add 1 to the numeric, convert back to a string and push back to the Spreadsheet?
Public Function UniqueID()
Call SetVariables
DIM LastID as String
DIM LastNumber as Integer
DIM NextNumber as Integer
DIM NextID as Integer
LastID = xTracker.Range("B" & tRow).Value
'==========================
'Remove text from string
'==========================
NextNumber = LastNumber+1
NextID = ("MIC-CT-" & NextNumber)
End Function
Unfortunately this is as far as I can go without removing the text from the string and converting it to an Integer.
Bookmarks