Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Arnand,
I should have added that the string "AAA BBB CCC DDD" is in fact double spaced. If this is intentional, change: arr = Split(sStr, Space(1)) to arr = Split(sStr, Space(2)) --- Regards. Norman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or if the number of spaces were unknown:
arr = Split(sStr, Space(1)) becomes: arr = Split(application.trim(sStr), Space(1)) Norman Jones wrote: Hi Arnand, I should have added that the string "AAA BBB CCC DDD" is in fact double spaced. If this is intentional, change: arr = Split(sStr, Space(1)) to arr = Split(sStr, Space(2)) --- Regards. Norman -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
============ Or if the number of spaces were unknown: arr = Split(sStr, Space(1)) becomes: arr = Split(application.trim(sStr), Space(1)) ============ Excellent improvemnt! Thankyou! --- Regards. Norman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
============
Or if the number of spaces were unknown: arr = Split(sStr, Space(1)) becomes: arr = Split(application.trim(sStr), Space(1)) ============ Excellent improvemnt! Although some may not consider this an improvement because it is not as clear as to what is going on, but the space character is the default delimiter for the Split function, so, in this case, it can be omitted... arr = Split(application.trim(sStr)) Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting numbers from alphanumeric strings | Excel Worksheet Functions | |||
extracting numbers from alphanumeric strings | Excel Programming | |||
Extracting time from strings | Excel Programming | |||
2 more questions about extracting numbers from text strings | Excel Discussion (Misc queries) | |||
extracting numerics from literal strings | Excel Programming |