Incrementing row number

  • Thread starter Thread starter den1s
  • Start date Start date
D

den1s

Is there a command that simply increments the row number?

I know you can use the command cells(x,x) to select the specific cell
but I would like to increment the row number, without prior knowledge
of where I was.

Also is there a command that returns the current active cell?

- D
 
maybe something like this

Option Explicit
Dim rNum As Long
Sub next_row()
rNum = ActiveCell.Row + 1
Debug.Print rNum
End Sub
 
Hi Denis,

Your two questions are very related ...
ActiveCell.Row would give you the row number of the active cell
and
ActiveCell.Offset(1,0) does increment the row by 1 and the column by 0
....

HTH
Carim
 
Just to add to Carim's post
ActiveCell.offset(1,0).Select

selects the next cell down from the currently selected cell.
 
Back
Top