Data & Formula on Muliple sheets by selection

ss427

New Member
Joined
Feb 28, 2011
Messages
2
Was hoping somebody could help me. I read through a number of post covering this and I am macro illiterate enough to not be able to get this to work. I have a spreadsheet with 10 tabs, where I want to be able to insert a row on one of the tabs based on whichever row I select and it insert the row on all the tabs. Then I need for the row that is above the inserted row to be copied down into the row that was created. I would like to copy certain pieces down on each tab instead of the whole row, but no complaints if it is the whole row on all tabs. I included a recorded macro below of the keystrokes I went to do the operation as if I was doing it manually. The macro below does not work correctly though (not sure why but doesn't work on the row I select).

Any help would be appreciated!!!!

Thanks

ss427





Sub Macro7()
'
' Macro7 Macro
' Macro recorded 2/28/2011 by John Cook
'

'
Sheets(Array("Summary", "Equipment List", "Electrical", "Process Water", _
"Heating Mediums", "Cooling Mediums", "Compressed Air", "Hydraulics", "Natural Gas" _
, "Vacuum")).Select
Sheets("Equipment List").Activate
ActiveCell.Offset(-487, 0).Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown
Sheets("Summary").Select
ActiveCell.Offset(-1, 1).Range("A1").Select
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveCell.Range("A1:AK1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:AK2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:AK2").Select
Sheets("Electrical").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Process Water").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Heating Mediums").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Cooling Mediums").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Compressed Air").Select
ActiveCell.Offset(-1, 4).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Hydraulics").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Natural Gas").Select
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Vacuum").Select
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 5
ActiveCell.Offset(-1, 1).Range("A1:B1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
Sheets("Equipment List").Select
ActiveCell.Offset(0, 1).Range("A1").Select
End Sub
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I've simplified it but still need some help. In the new code I have an entire row across multiple tabs being inserted. I now need to get the row above the inserted row to be copied down.

' Test2 Macro

Sheets(Array("Summary", "Equipment List", "Electrical", "Process Water", _
"Heating Mediums", "Cooling Mediums", "Compressed Air", "Hydraulics", "Natural Gas" _
, "Vacuum")).Select
Sheets("Equipment List").Activate
Dim x As Integer
x = ActiveCell.Row
Selection.Insert Shift:=xlDown
Range("A9:AM9").Select
Selection.Copy
Range("A10").Select
ActiveSheet.Paste
Sheets("Equipment List").Select
Range("B10").Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top