Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array of Strings
I want to set up, for lack of a better term, an array of strings,
evidently a 2-D String array. The number of strings and the number of characters per string will vary according to conditions. How do I dimension the array? Thanks, James |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array of Strings
Hi Zone,
Dim myArray(10) as String Strings are variable length per se. HTH -- AP "Zone" a écrit dans le message de news: ... I want to set up, for lack of a better term, an array of strings, evidently a 2-D String array. The number of strings and the number of characters per string will vary according to conditions. How do I dimension the array? Thanks, James |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array of Strings
Thank you, Ardus. However, I did not make clear what I'm trying to do.
I want the array to hold a set of strings for use as a heading row. Depending on the value of a cell in the selected row, I insert a heading row before the selected row and put the correct heading above each cell in the selected row. It seems very inefficient to use code like Select Case cells(activecell.row, "a") Case "Alba" myArray(1)="Alba Heading A" myArray(2)="Alba Heading B" and so on for 26 headings and 25 cases. I was hoping for a simpler construct. Maybe I'm stuck with this. Any ideas? Regards, James Ardus Petus wrote: Hi Zone, Dim myArray(10) as String Strings are variable length per se. HTH -- AP "Zone" a écrit dans le message de news: ... I want to set up, for lack of a better term, an array of strings, evidently a 2-D String array. The number of strings and the number of characters per string will vary according to conditions. How do I dimension the array? Thanks, James |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array of Strings
Maybe...
dim myStrings(1 to 3, 1 to 7) as string (this would result in a 3x7 array (21 elements)) Zone wrote: I want to set up, for lack of a better term, an array of strings, evidently a 2-D String array. The number of strings and the number of characters per string will vary according to conditions. How do I dimension the array? Thanks, James -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display an array of references | Excel Worksheet Functions | |||
How to multiply all cells in array by factor | Excel Discussion (Misc queries) | |||
Transpose words and numbers into array of different proportions | Excel Discussion (Misc queries) | |||
Formula to list unique values | Excel Worksheet Functions | |||
VBA Import of text file & Array parsing of that data | Excel Discussion (Misc queries) |