View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie[_2_] David McRitchie[_2_] is offline
external usenet poster
 
Posts: 134
Default Using VB to find next cell in range

Hi Tim,
By range set up that could be a specific range, a defined name,
or selection. So by selecting A3:A350 ahead of time, you
can run a macro to go through the cells left to right and down
to next row of selection and across. There is no need to
change the selection as you run through the macro
Take a look at
Rearranging Data in Columns
http://www.mvps.org/dmcritchie/excel/join.htm
specifically the macro MarkCells
http://www.mvps.org/dmcritchie/excel/join.htm#markcells

Information on writing the macro efficiently read descriptive
information on my
Proper, and other Text changes -- Use of SpecialCells
http://www.mvps.org/dmcritchie/excel/proper.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Don Pistulka" wrote in message ...
Tim,

Sub Dtest()
Range("a3").Select
Selection.Offset(1, 0).Select
End Sub

Don Pistulka

"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