Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 191
Default Adding a Row to Multiple Worksheets at Once

Im working in Excel 2003. Im working on a project that will track
employees errors (dollar, procedure, or no errors). I have 13 worksheets.
The first one is titled Summary and is followed by worksheets titled January
through December. The Summary worksheet functions as the control. The user
enters each employees name on the Summary worksheet into cell A7. The
employees name is automatically entered into cell A7 in the January through
December worksheets using =Summary!A7.

The table it self consists of 3 rows and begins on Row 6. Column titles
include (employees name, etc.). The user types employee information into
Row 7. Row 8 is a Total row.

What I would like to be able to do is, have a button on the Summary
worksheet that triggers a macro which will add a row below row A7 (new row is
A8) in all 13 worksheets.

--
Jamie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,080
Default Adding a Row to Multiple Worksheets at Once

Use the following macro:

Sub AddRow8()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Rows(8).Insert
Next
End Sub

__________________________________________________ ____________________

"Jamie" wrote in message
...
I'm working in Excel 2003. I'm working on a project that will track
employee's errors (dollar, procedure, or no errors). I have 13
worksheets.
The first one is titled Summary and is followed by worksheets titled
January
through December. The Summary worksheet functions as the control. The
user
enters each employee's name on the Summary worksheet into cell A7. The
employee's name is automatically entered into cell A7 in the January
through
December worksheets using =Summary!A7.

The table it self consists of 3 rows and begins on Row 6. Column titles
include (employee's name, etc.). The user types employee information into
Row 7. Row 8 is a Total row.

What I would like to be able to do is, have a button on the Summary
worksheet that triggers a macro which will add a row below row A7 (new row
is
A8) in all 13 worksheets.

--
Jamie



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Adding a Row to Multiple Worksheets at Once

Try this:-

Sub atomic()
Dim WS As Worksheet
For Each WS In Worksheets
WS.Select
Range("A8").Select
Selection.EntireRow.Insert
Next WS
End Sub

"Jamie" wrote:

Im working in Excel 2003. Im working on a project that will track
employees errors (dollar, procedure, or no errors). I have 13 worksheets.
The first one is titled Summary and is followed by worksheets titled January
through December. The Summary worksheet functions as the control. The user
enters each employees name on the Summary worksheet into cell A7. The
employees name is automatically entered into cell A7 in the January through
December worksheets using =Summary!A7.

The table it self consists of 3 rows and begins on Row 6. Column titles
include (employees name, etc.). The user types employee information into
Row 7. Row 8 is a Total row.

What I would like to be able to do is, have a button on the Summary
worksheet that triggers a macro which will add a row below row A7 (new row is
A8) in all 13 worksheets.

--
Jamie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,080
Default Adding a Row to Multiple Worksheets at Once

No need to select anything; but my earlier solution had a flaw (that's what
I get for not testing). It should be:

Sub AddRow8()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Rows(8).Insert
Next
End Sub.
__________________________________________________ ________________________


"Mike H" wrote in message
...
Try this:-

Sub atomic()
Dim WS As Worksheet
For Each WS In Worksheets
WS.Select
Range("A8").Select
Selection.EntireRow.Insert
Next WS
End Sub

"Jamie" wrote:

I'm working in Excel 2003. I'm working on a project that will track
employee's errors (dollar, procedure, or no errors). I have 13
worksheets.
The first one is titled Summary and is followed by worksheets titled
January
through December. The Summary worksheet functions as the control. The
user
enters each employee's name on the Summary worksheet into cell A7. The
employee's name is automatically entered into cell A7 in the January
through
December worksheets using =Summary!A7.

The table it self consists of 3 rows and begins on Row 6. Column titles
include (employee's name, etc.). The user types employee information
into
Row 7. Row 8 is a Total row.

What I would like to be able to do is, have a button on the Summary
worksheet that triggers a macro which will add a row below row A7 (new
row is
A8) in all 13 worksheets.

--
Jamie



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
Adding multiple worksheets tee Excel Worksheet Functions 2 August 19th 06 12:35 AM
Adding values for multiple worksheets ArenaNinja Excel Discussion (Misc queries) 3 June 3rd 06 12:48 AM
Adding cells from multiple Worksheets Joe Excel Discussion (Misc queries) 1 October 6th 05 06:25 PM
Adding multiple worksheets Craig Excel Worksheet Functions 1 July 6th 05 07:21 PM
adding certain cells in multiple worksheets in multiple workbooks Stephen via OfficeKB.com Excel Worksheet Functions 1 February 4th 05 08:31 PM


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

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"