Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default can we add a blank line after every...lines?

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)

"Martyn" wrote in message
...
Hi,
Wanna add a blank line to the worksheet after every 20 lines with a macro.
Can you suggest ways?
TIA




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default can we add a blank line after every...lines?

Change your clock first.

--
Don Guillett
SalesAid Software

"Martyn" wrote in message
...
Hi,
Wanna add a blank line to the worksheet after every 20 lines with a macro.
Can you suggest ways?
TIA




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default can we add a blank line after every...lines?

Hi,
Wanna add a blank line to the worksheet after every 20 lines with a macro.
Can you suggest ways?
TIA


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default can we add a blank line after every...lines?

Thanks a lot Bob,
it does the trick.


"Bob Phillips" wrote in message
...
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)

"Martyn" wrote in message
...
Hi,
Wanna add a blank line to the worksheet after every 20 lines with a

macro.
Can you suggest ways?
TIA






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add a line every 3 lines in a 5600 line spreadsheet? Karen Rosenberger Excel Discussion (Misc queries) 2 September 25th 09 12:45 AM
macro to insert blank line when lines sum to zero TCoats Excel Discussion (Misc queries) 0 July 2nd 07 05:08 PM
Macro not recognizing blank lines as blank pm Excel Discussion (Misc queries) 9 May 22nd 07 04:16 PM
10 000 Line, every 2 Lines need a border and a open line inbet. e. annalie Excel Discussion (Misc queries) 2 January 30th 06 03:15 PM
how to automatically insert blank lines in between non-blank lines No Name Excel Programming 2 November 17th 03 03:40 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"