A
ags5406
I want to create a string that depends on the number of items in a
list.
For example, say my list looks like the following:
(a1) baseball
(a2) football
(a3) basketball
(a4) hockey
(a5) lacrosse
(a6) soccer
The string that I want will be:
John Doe plays baseball, football, basketball, hockey, lacrosse, and
soccer.
I could just use:
string = "John Doe plays " & A1 & ", " & A2 & ", " & A3 & ", " & A4 &
", " & A5 & ", " & A6 &"."
But the trick is that I won't know ahead of time how many items are in
the list. For one guy it might be three sports in the list and for
another it might be five.
Can I somehow use for/next to create the string with different numbers
of items????
Thx in advance.
list.
For example, say my list looks like the following:
(a1) baseball
(a2) football
(a3) basketball
(a4) hockey
(a5) lacrosse
(a6) soccer
The string that I want will be:
John Doe plays baseball, football, basketball, hockey, lacrosse, and
soccer.
I could just use:
string = "John Doe plays " & A1 & ", " & A2 & ", " & A3 & ", " & A4 &
", " & A5 & ", " & A6 &"."
But the trick is that I won't know ahead of time how many items are in
the list. For one guy it might be three sports in the list and for
another it might be five.
Can I somehow use for/next to create the string with different numbers
of items????
Thx in advance.