View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2019_] Rick Rothstein \(MVP - VB\)[_2019_] is offline
external usenet poster
 
Posts: 1
Default extracting strings from cell

============
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