Return cursor to proper place

J

John

Hi Everyone,
How would I phrase this ;
Find first empty row in column A, offset to first empty cell on the same row.
or find current date in column A, offset to first empty cell on the same row.
I want my cursor to return to that position after I've used a macro.
Regards
John
 
O

ozgrid.com

Oops, wrong direction

Application.Goto Range("A1").End(xlDown).End(xlToRight)(1, 2)
 
F

FSt1

hi
not sure if you phrased it right.
as i see it, the first cell of the first empty row would be the first empty
cell of the empty row. so to do that....
Range("A65000").End(xlUp).Offset(1, 0).Activate
once you have found the cell, do this.
dim r as range
dim s as sheet
set s = activesheet 'mark current sheet
set r = activecell. 'mark current cell
'run macro
s.select 'return to marked sheet
r.select 'return to marked cell

regards
FSt1
 
J

John

Thank you both Dave and FSt1
Regards
John
FSt1 said:
hi
not sure if you phrased it right.
as i see it, the first cell of the first empty row would be the first empty
cell of the empty row. so to do that....
Range("A65000").End(xlUp).Offset(1, 0).Activate
once you have found the cell, do this.
dim r as range
dim s as sheet
set s = activesheet 'mark current sheet
set r = activecell. 'mark current cell
'run macro
s.select 'return to marked sheet
r.select 'return to marked cell

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top