set range question

  • Thread starter Thread starter David Goodall
  • Start date Start date
D

David Goodall

Hi,
I've written the following code and would like to improve it.

sub cellchecker()
Dim CellsToBeChecked As Range
Set CellsToBeChecked = Range("B1:B2500") - the range contains a list of
names
further code.....
end sub

I only actually need to check cells that contain names and the list of names
can vary for 20 to 2500.I would like to be able to alter the set range
upper limit accordingly.

I hope that makes sense.

Many thanks
David
 
Hi David,

Set the range as below or please look into the word "Specialcells" i
the VBA help.


Code
 
Back
Top