ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using VB to find next cell in range (https://www.excelbanter.com/excel-programming/272389-re-using-vbulletin-find-next-cell-range.html)

David McRitchie[_2_]

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







All times are GMT +1. The time now is 06:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com