View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
howard howard is offline
external usenet poster
 
Posts: 68
Default assigning variables

I have a problem that's new to me. I have a column, say B2 through B15.
There aare names in say the first 8 cells. Elsewhere in the code, I do
things with these names; for example I sort these names. Sometimes the
number of names will change. I may have 8 cells with names, and I will need
to change this to 7 cells with names or 9 cells with names. Because the
number of cells with names changes sometimes, and this reference is used in a
number of places in macros and VBA, I would like to assign a variable to the
number of cells, i.e. (variable 'a' = cells B2 thru B9), and then use this
variable insteal of the cell references. This way, if I have to add or
delete a name from the cells, I only have to do it in one place. Any
suggestions?
Thanks, Howard
--
Howard