Home |
Search |
Today's Posts |
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot, Per Jessen, Nigel, Jacob, and Rick.
@ Jacob -- My approach was exactly like yours, except your For-loop construct is more efficient. I see in your code, strE was not initialized first. In VBA, are all string declarations automatically set to null in the beginning? @ Rick -- Your bringing up of the optional 3rd argument gave me another new idea for implementing another part of my project. @Nigel and Per Jessen -- Yes, you were right. I should have probably stated in my original post that my first index was brkout(i)=0, not brkout(i)=1. I sometimes forget VBA indices start from 0. Jay *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just out of curiosity, why wouldn't you use the 3rd argument approach for
this part of your application as well (given that it eliminates the need for a loop altogether)? -- Rick (MVP - Excel) "jay dean" wrote in message ... Thanks a lot, Per Jessen, Nigel, Jacob, and Rick. @ Jacob -- My approach was exactly like yours, except your For-loop construct is more efficient. I see in your code, strE was not initialized first. In VBA, are all string declarations automatically set to null in the beginning? @ Rick -- Your bringing up of the optional 3rd argument gave me another new idea for implementing another part of my project. @Nigel and Per Jessen -- Yes, you were right. I should have probably stated in my original post that my first index was brkout(i)=0, not brkout(i)=1. I sometimes forget VBA indices start from 0. Jay *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick your solution is most elegant.
-- Regards, Nigel "Rick Rothstein" wrote in message ... Just out of curiosity, why wouldn't you use the 3rd argument approach for this part of your application as well (given that it eliminates the need for a loop altogether)? -- Rick (MVP - Excel) "jay dean" wrote in message ... Thanks a lot, Per Jessen, Nigel, Jacob, and Rick. @ Jacob -- My approach was exactly like yours, except your For-loop construct is more efficient. I see in your code, strE was not initialized first. In VBA, are all string declarations automatically set to null in the beginning? @ Rick -- Your bringing up of the optional 3rd argument gave me another new idea for implementing another part of my project. @Nigel and Per Jessen -- Yes, you were right. I should have probably stated in my original post that my first index was brkout(i)=0, not brkout(i)=1. I sometimes forget VBA indices start from 0. Jay *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, I now see that your code will be the one to use because the
3rd argument specifies "how many strings to return". With my needing the first 4, everything else will be stored in the 5th (Leftover). Man, the SPLIT() function is really powerful. Thanks again, Rick ! Jay ============================================== Rick wrote: Just out of curiosity, why wouldn't you use the 3rd argument approach for this part of your application as well (given that it eliminates the need for a loop altogether)? ======================================== *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From the original query I wan't sure whether Jay would want the data to be
splitted and stored in the last variable.. The 3rd argument of SPLIT() takes a by default value of -1 which indicate to split all substrings..and the 4th argument gives an option to specify the comparison (binary or text) which make is powerful. Thanks Rick. If this post helps click Yes --------------- Jacob Skaria "Rick Rothstein" wrote: Just out of curiosity, why wouldn't you use the 3rd argument approach for this part of your application as well (given that it eliminates the need for a loop altogether)? -- Rick (MVP - Excel) "jay dean" wrote in message ... Thanks a lot, Per Jessen, Nigel, Jacob, and Rick. @ Jacob -- My approach was exactly like yours, except your For-loop construct is more efficient. I see in your code, strE was not initialized first. In VBA, are all string declarations automatically set to null in the beginning? @ Rick -- Your bringing up of the optional 3rd argument gave me another new idea for implementing another part of my project. @Nigel and Per Jessen -- Yes, you were right. I should have probably stated in my original post that my first index was brkout(i)=0, not brkout(i)=1. I sometimes forget VBA indices start from 0. Jay *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Substituting substrings | Excel Programming | |||
Macro Help for Substrings | Excel Programming | |||
sum wrt substrings! | Excel Worksheet Functions | |||
Substrings in Excel? | Excel Discussion (Misc queries) | |||
STRINGS AND SUBSTRINGS ! | Excel Programming |