smma
Mechanical
- Jun 4, 2007
- 24
I am new to VB, and I have a question. I want to create an array from a range of cells, starting at C9 and using the xldown to go to the last nonblank cell to grab my array. Then, I would like to make the array be listed in two ways: if the number of cells is 1 (C9 only), it would only list C9. If it is more than 1, then the array would be resolved as "C9 + Chr(13) + Chr(10) + next cell" and loop through until the array is filled. Does anyone have any ideas on how this could properly be set up with a for/next statement? Will I need an If Then statement nested within the For/Next? Your input would be greatly appreciated.