Go to First Empty Row

  • Thread starter Thread starter Khalil Handal
  • Start date Start date
K

Khalil Handal

Hi,
I have a sheet that has successive rows with data. What is the macro code so
as I can go to the first empty row? I need this so I can strt working from
that point to continue entering data
 
going down
mc="a"
fer=cells(activecell.row,mc).end(xldown).row+1

usually better from the bottom up
mc="a"
lr=cells(rows.count,mc).end(xlup).row+1
 
I used the code in a maco but the active cell when running the macro didn't
move down to the first empty row! I am not familiar with this! Can you have
further instructions please?
 
Post the code you came up with that doesn't move down.

Either of Don's two sets of code works only on column A


Gord Dibben MS Excel MVP
 
My Active cell is A6.
created a mcro and posted the code and t looks as follows:

Sub godown()
mc = "a"
fer = Cells(ActiveCell.Row, mc).End(xlDown).Row + 1
End Sub

After runnig the macro the active cell remained A6. It should go down to
cell A56 which is the first empty row. I don't know what is missing???
 
You asked for the row.
Sub godown()
mc = "a"
fer = Cells(ActiveCell.Row, mc).End(xlDown).Row + 1

'add this. However selection is rarely necessary or desirable
cells(fer,mc).select

End Sub
 
Thanks

Don Guillett said:
You asked for the row.
Sub godown()
mc = "a"
fer = Cells(ActiveCell.Row, mc).End(xlDown).Row + 1

'add this. However selection is rarely necessary or desirable
cells(fer,mc).select

End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
Back
Top