LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help writing a macro

Yeah, selecting them all is a good idea. I like it <vbg

Bob


wrote in message
oups.com...
Here is a slight variation on Bob's solution.
I assume you have each sheet populated with staff members names.
I also assume the name are in col A or Col B startin at row 11 and
ending in row 39 (11+ 28).
The code below selects all of the sheets at once and then performs the
insertion of 2 rows beneath each staff member.

Sub AddRows()

Sheets(Array("Jan", "Feb", "Mar", "Apr")).Select '<== Add additional
sheets

For i = 12 To 96 Step 3
Worksheets(1).Rows(i).Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Next i

End Sub



 
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
Writing a macro RB[_2_] Excel Worksheet Functions 0 January 14th 08 05:40 PM
Writing a macro Roxio Excel Programming 1 October 26th 05 05:56 PM
Macro Writing rjamison Excel Programming 0 June 14th 05 12:14 AM
help in writing a macro slim[_2_] Excel Programming 1 February 13th 04 01:41 AM
Writing Macro Tammy Klein Excel Programming 1 October 3rd 03 09:13 PM


All times are GMT +1. The time now is 06:12 PM.

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

About Us

"It's about Microsoft Excel"