Need to add Seq (1,2,3...) down row using code

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
1,742
Office Version
  1. 365
Platform
  1. Windows
I need to number my rows down to the last row with data. I want to put the seq in B5 down

I'm using

Dim CBOMLstRw As Long

CBOMLstRw = Sheet2.Range("C" & Rows.Count).End(xlUp).Row


right now I am adding 1 to cell B5 and a formula to add 1 to B5 and copying the formula down to the end and then doing a Paste value to remove the formula. There has to be a better way

THANK YOU FOR SHARING YOUR KNOWLEDGE
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Watch MrExcel Video

Forum statistics

Threads
1,108,816
Messages
5,525,064
Members
409,617
Latest member
Lenaf

This Week's Hot Topics

Top