PC Review


Reply
Thread Tools Rate Thread

Adding a Row to Multiple Worksheets at Once

 
 
=?Utf-8?B?SmFtaWU=?=
Guest
Posts: n/a
 
      20th Jun 2007
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 With Quote
 
 
 
 
Vasant Nanavati
Guest
Posts: n/a
 
      20th Jun 2007
Use the following macro:

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

______________________________________________________________________

"Jamie" <(E-Mail Removed)> wrote in message
news:8079EC02-72D5-4A9A-9A1D-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      20th Jun 2007
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 With Quote
 
Vasant Nanavati
Guest
Posts: n/a
 
      21st Jun 2007
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" <(E-Mail Removed)> wrote in message
news:16DBD072-9680-4DA4-8154-(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Multiple Worksheets grumblenoise@googlemail.com Microsoft Excel Discussion 10 12th Jun 2008 11:55 AM
Adding multiple worksheets =?Utf-8?B?VGVl?= Microsoft Excel Worksheet Functions 4 19th Aug 2006 12:35 AM
Adding multiple worksheets =?Utf-8?B?Q3JhaWc=?= Microsoft Excel Worksheet Functions 1 6th Jul 2005 07:21 PM
adding certain cells in multiple worksheets in multiple workbooks Stephen via OfficeKB.com Microsoft Excel Worksheet Functions 1 4th Feb 2005 08:31 PM
adding between multiple worksheets Tomas Microsoft Excel Misc 1 30th Sep 2003 01:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 AM.