ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro (https://www.excelbanter.com/excel-programming/282789-macro.html)

Richard Toller

Macro
 

I'm trying to write a macro that automatically takes me to the nex
available row to enter data in my "Orders" worksheet in Column A
Sounds simple, but I'm doing something wrong. Thanks for any help!
Ric

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Jase

Macro
 
have you tried x = range("A65536").end(xlup).row +1
this should assign x to the first blank row looking from
the bottom of the sheet.

Hope this helps
Jase
-----Original Message-----

I'm trying to write a macro that automatically takes me

to the next
available row to enter data in my "Orders" worksheet in

Column A.
Sounds simple, but I'm doing something wrong. Thanks for

any help!
Rich


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.


JerryG[_3_]

Macro
 
Rich,

Try this simple macro out. I use this frequently and
usually assign it to a button I've placed in my header
row. If you have your header row in a freeze pane, the
button will always be available and each time you click on
it, the macro will take you to the next "available" or
empty row found in the active cell's column. Let me know
if you have any questions or problems with it.

Sub Next_Open_Row()
Dim iRow As Long
For iRow = ActiveCell.Row + 1 To 65530
If IsEmpty(Cells(iRow, ActiveCell.Column)) Then
Cells(iRow, ActiveCell.Column).Select
Exit Sub
End If
Next iRow
End Sub

-----Original Message-----

I'm trying to write a macro that automatically takes me

to the next
available row to enter data in my "Orders" worksheet in

Column A.
Sounds simple, but I'm doing something wrong. Thanks for

any help!
Rich


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 09:58 AM.

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