Auto fill Row Numbers in Col A

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a simple macro to add a row number in col A if there is text in Col
B. I've searched this site but haven't found anything similar? Thanks for
your help.
 
right click sheet tab>view code>copy/paste this
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
Target.Offset(, -1) = Target.Row

End Sub
 

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

Back
Top