Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically insert multiple blank rows in worksheet
This is the code to insert a blank row after each row of
data in my worksheet. I need to convert it to inserting 7 blank rows afer each row of data. So far...no luck. Can anyone assist? Thanks in advance!! Sub Insert_Blank_Rows() 'Select last row in worksheet. Selection.End(x1Down).Select Do Until ActiveCell.Row = 1 'Insert blank row. ActiveCell.EntireRow.Insert shift:=x1Down 'Move up one row. ActiveCell.Offset(-1, 0).Select Loop End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically insert multiple blank rows in worksheet
Try changing the following line of code:
ActiveCell.EntireRow.Insert shift:=x1Down to ActiveCell.Resize(7).EntireRow.Insert shift:=x1Down -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "tag" wrote in message ... This is the code to insert a blank row after each row of data in my worksheet. I need to convert it to inserting 7 blank rows afer each row of data. So far...no luck. Can anyone assist? Thanks in advance!! Sub Insert_Blank_Rows() 'Select last row in worksheet. Selection.End(x1Down).Select Do Until ActiveCell.Row = 1 'Insert blank row. ActiveCell.EntireRow.Insert shift:=x1Down 'Move up one row. ActiveCell.Offset(-1, 0).Select Loop End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically insert multiple blank rows in worksheet
and change x(one)down to x(ell)down.
Rob Bovey wrote: Try changing the following line of code: ActiveCell.EntireRow.Insert shift:=x1Down to ActiveCell.Resize(7).EntireRow.Insert shift:=x1Down -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "tag" wrote in message ... This is the code to insert a blank row after each row of data in my worksheet. I need to convert it to inserting 7 blank rows afer each row of data. So far...no luck. Can anyone assist? Thanks in advance!! Sub Insert_Blank_Rows() 'Select last row in worksheet. Selection.End(x1Down).Select Do Until ActiveCell.Row = 1 'Insert blank row. ActiveCell.EntireRow.Insert shift:=x1Down 'Move up one row. ActiveCell.Offset(-1, 0).Select Loop End Sub -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically insert multiple blank rows in worksheet
"Dave Peterson" wrote in message
... and change x(one)down to x(ell)down. LOL! Yeah, that would help, wouldn't it? <g -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Dave Peterson" wrote in message ... and change x(one)down to x(ell)down. Rob Bovey wrote: Try changing the following line of code: ActiveCell.EntireRow.Insert shift:=x1Down to ActiveCell.Resize(7).EntireRow.Insert shift:=x1Down -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "tag" wrote in message ... This is the code to insert a blank row after each row of data in my worksheet. I need to convert it to inserting 7 blank rows afer each row of data. So far...no luck. Can anyone assist? Thanks in advance!! Sub Insert_Blank_Rows() 'Select last row in worksheet. Selection.End(x1Down).Select Do Until ActiveCell.Row = 1 'Insert blank row. ActiveCell.EntireRow.Insert shift:=x1Down 'Move up one row. ActiveCell.Offset(-1, 0).Select Loop End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text to Rows and then Insert Blank Rows | Excel Discussion (Misc queries) | |||
Need to insert blank rows | Excel Worksheet Functions | |||
Insert Multiple Blank Rows | Excel Discussion (Misc queries) | |||
How do i insert blank rows between data that is thousands of rows | Excel Discussion (Misc queries) | |||
How do I insert blank rows between rows in completed worksheet? | Excel Discussion (Misc queries) |