can we add a blank line after every...lines?

  • Thread starter Thread starter Bob Phillips
  • Start date Start date
B

Bob Phillips

Martyn,

Here is some code

Dim i As Long
Dim cRows As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row
cRows = cRows - (cRows Mod 20)

For i = cRows To 20 Step -20
Cells(i, "A").EntireRow.Insert
Next i

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi,
Wanna add a blank line to the worksheet after every 20 lines with a macro.
Can you suggest ways?
TIA
 
Thanks a lot Bob,
it does the trick.


Bob Phillips said:
Martyn,

Here is some code

Dim i As Long
Dim cRows As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row
cRows = cRows - (cRows Mod 20)

For i = cRows To 20 Step -20
Cells(i, "A").EntireRow.Insert
Next i

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top