Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default set range question

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default set range question

Hi David,

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


Code
-------------------

Set CellsToBeChecked = Range(Range("B1"), Range("B65536").End(xlUp))

-------------------


--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range question Jock Excel Worksheet Functions 3 March 19th 08 04:36 PM
Range Question N.F[_2_] Excel Discussion (Misc queries) 5 July 28th 07 01:05 AM
Range Question Ray Batig Excel Programming 4 January 31st 04 05:01 AM
If Range.Name question Otto Moehrbach[_5_] Excel Programming 8 November 30th 03 11:05 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"