Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Using VB to find next cell in range

You can treat the range as a vertical array of Cells and access them by
index:.

With Range("A3:A350")
Debug.Print .Cells(1).Value 'cell A3
Debug.Print .Cells(2).Value 'cell A4
Debug.Print .Cells(3).Value 'cell A5
...
Debug.Print .Cells(.Cells.Count).Value 'cellA350
End With

Range("A3:A350").Cells.Count gives the total number of cells in the range.

You could access the entire series in a counter controlled loop.

Bob Kilmer


"Tim" wrote in message
...
Can someone help me find the code that will allow me to
find the next cell in a range. I have a range set up,
i.e. Range("A3:A350"), and a range variable set to the
first cell A3. As my code executes I need the range
variable originally set to A3 to move down the larger
range of ("A3:A350"), say to A4. I thought the Next
property might work but I am having trouble with it. Any
help would be appreciated!!

Tim McPhillips



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
Find Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
Find a Cell Value In a Range Michael Excel Worksheet Functions 4 July 17th 07 10:03 PM
Find Cell in Named Range David Excel Worksheet Functions 3 May 8th 07 06:00 AM
Find if any cell in range is above Zero [email protected] Excel Discussion (Misc queries) 3 April 19th 06 11:01 AM


All times are GMT +1. The time now is 01:57 PM.

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

About Us

"It's about Microsoft Excel"