So this list of values changes? Will it always be A1, B1, C1 and down without spaces?
If you select the first cell and then run Range(Selection, Selection.End(xlDown)).Select this does the same as Ctrl + Shift + Down highlighting every cell until there are no more with content in them. Now you can use a loop that goes through each cell and store the value.
Here's some code to get you started:
Sub Macro16()
Dim Colours() AsString' declares a dynamic array variable
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Excel Forum.