![]() |
Help with Array & Split
Hello all,
I have a form that has data that the user enters with respect to a part number, i have a radio button that if the user selects then he can enter multiple part numbers, seperated by a comma ",". All the other data remains the same. What i am trying to do and really battling with is to split the numbers by "," and then for every number i would like to start a new line and insert all the data in a spreadsheet. What i had in mind was an array with a split function, but not sure if i am thinking in the right direction. Any help would be much appreciated. -- Les |
Help with Array & Split
You can always input a string variable and create an array from it:
Sub les() Dim s As String s = "1,2,3" ar = Split(s, ",") End Sub -- Gary''s Student - gsnu200804 "Les" wrote: Hello all, I have a form that has data that the user enters with respect to a part number, i have a radio button that if the user selects then he can enter multiple part numbers, seperated by a comma ",". All the other data remains the same. What i am trying to do and really battling with is to split the numbers by "," and then for every number i would like to start a new line and insert all the data in a spreadsheet. What i had in mind was an array with a split function, but not sure if i am thinking in the right direction. Any help would be much appreciated. -- Les |
Help with Array & Split
Thanks Gary
-- Les "Gary''s Student" wrote: You can always input a string variable and create an array from it: Sub les() Dim s As String s = "1,2,3" ar = Split(s, ",") End Sub -- Gary''s Student - gsnu200804 "Les" wrote: Hello all, I have a form that has data that the user enters with respect to a part number, i have a radio button that if the user selects then he can enter multiple part numbers, seperated by a comma ",". All the other data remains the same. What i am trying to do and really battling with is to split the numbers by "," and then for every number i would like to start a new line and insert all the data in a spreadsheet. What i had in mind was an array with a split function, but not sure if i am thinking in the right direction. Any help would be much appreciated. -- Les |
Help with Array & Split
You are quite welcome.
-- Gary''s Student - gsnu200804 "Les" wrote: Thanks Gary -- Les "Gary''s Student" wrote: You can always input a string variable and create an array from it: Sub les() Dim s As String s = "1,2,3" ar = Split(s, ",") End Sub -- Gary''s Student - gsnu200804 "Les" wrote: Hello all, I have a form that has data that the user enters with respect to a part number, i have a radio button that if the user selects then he can enter multiple part numbers, seperated by a comma ",". All the other data remains the same. What i am trying to do and really battling with is to split the numbers by "," and then for every number i would like to start a new line and insert all the data in a spreadsheet. What i had in mind was an array with a split function, but not sure if i am thinking in the right direction. Any help would be much appreciated. -- Les |
All times are GMT +1. The time now is 01:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com