Counting digits, extracting numbers (resolved)
I can get the number of digits in an integer in two functions:
Digits = Len(Str(intX)) - 1
But is there a function that does this in one?
also . . .
I have various strings like:
1 day
2 days
14 days
365 days
And I want to extract just the numbers into another string. Is this the slickest way:
strNumber = Replace(strDays, " day", vbNullString)
strNumber = Replace(strDays, "s", vbNullString)
I know I'm quibbling when it could be said, "if it ain't broke... " but I'm just as concerned with creating streamlined code that's easy to read.