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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top