Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor to next blank line 1

Status
Not open for further replies.

copeco

Technical User
Jun 11, 2002
31
US
Good morning. I use an excel sheet(many pages)for input of purchasing info. I am forever paging up & down looking for things. Right now the object is to have the cursor goto the bottom of the list & sit on the next unused line. I use Autofilter to find the next "blank" in the date column, but when I take the Autofilter off the page & the cursor goes back to where it was b/4 the Autofilter action started. The cursor needs to stay at the new position so info can be inputted. (I have programmed buttons to do various sorting operations. I'll program a button for this one too)..thanks
 
Hi
Depending on how your data is set up you could use either of the following:-

Code:
[a1].End(xlDown).Offset(1, 0).Select
[a65536].End(xlUp).Offset(1, 0).Select

If you have gaps on the way down use the second option. Both assume data to be present in Col A

Using
Code:
Cells(UsedRange.SpecialCells(xlCellTypeLastCell).Row, 1).Offset(1, 0).Select
is a little more dynamic but you can't rely on UsedRange too much.

Check out the FAQs as there are at least 2 showing how to obtain last/first row/column by xlbo and myself!

Happy Friday
;-)
If a man says something and there are no women there to hear him, is he still wrong?
 
thanks for the info..I used the 1st one.Merry Christmas!!
 
You can also do the following key sequence

End - DownArrow - DownArrow

:) Skip,
SkipAndMary1017@mindspring.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top