Select Cells

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
Need Some code to select the next empty cell on a page for example
range("a1").select
'where a2 is the next avaliable cell
then a3 and so on?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
On 2002-03-13 16:54, brettvba wrote:
Need Some code to select the next empty cell on a page for example
range("a1").select
'where a2 is the next avaliable cell
then a3 and so on?

There are better methods but this old dog is only just learning:

Dim MTCell as Range
for each MTcell in Range("a1:A10")
If ActiveCell = Not Empty Then
(do your thing here)
End If
Next
 
Upvote 0
On 2002-03-13 16:54, brettvba wrote:
Need Some code to select the next empty cell on a page for example
range("a1").select
'where a2 is the next avaliable cell
then a3 and so on?


Dim cell As Range, rng As Range
Set rng = Columns(1).SpecialCells(xlCellTypeBlanks)
For Each cell In rng
MsgBox cell.Address
Next
 
Upvote 0
On 2002-03-14 00:40, Anonymous wrote:
On 2002-03-13 16:54, brettvba wrote:
Need Some code to select the next empty cell on a page for example
range("a1").select
'where a2 is the next avaliable cell
then a3 and so on?

Or perhaps you are just looking for :-

[A65536].End(xlUp)(2,1).Select


Dim cell As Range, rng As Range
Set rng = Columns(1).SpecialCells(xlCellTypeBlanks)
For Each cell In rng
MsgBox cell.Address
Next
 
Upvote 0

Forum statistics

Threads
1,214,521
Messages
6,120,018
Members
448,937
Latest member
BeerMan23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top