Macro to insert a row after every 4th row
I need a macro that will insert a blank row after every fourth row in my
spreadsheet. Thanks! |
Macro to insert a row after every 4th row
try
Sub insertrowevery4throw() For i = 4 To Cells(Rows.Count, "a").End(xlUp).Row Step 4 Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Amandar097" wrote in message ... I need a macro that will insert a blank row after every fourth row in my spreadsheet. Thanks! |
Macro to insert a row after every 4th row
Thanks Don - that's exactly what I needed :)
"Don Guillett" wrote: try Sub insertrowevery4throw() For i = 4 To Cells(Rows.Count, "a").End(xlUp).Row Step 4 Rows(i).Insert Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Amandar097" wrote in message ... I need a macro that will insert a blank row after every fourth row in my spreadsheet. Thanks! |
All times are GMT +1. The time now is 03:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com