Apply format to all sheets starting on the 4th sheet

ExcelNoob11

New Member
Joined
Jul 17, 2018
Messages
7
I have a template sheet called "template" that I'd like to apply to all sheets starting on the 4th. How do I loop through each sheet, apply the format and do some other functions. I posted a macro I create to do it manually. But it needs to dynamically take the value in A9, paste into the range b3:j3 and get rid of the first column.

Code:
    Sheets("Template").Select    Rows("1:8").Select
    Selection.Copy
   
 'loop to go through worksheets commented out
   ' For I = 4 To (Worksheets.Count())
   '     
   'Next
    
    Sheets("SheetAlpha").Select
    Rows("1:1").Select
    Selection.Insert Shift:=xlDown
    Rows("9:9").Select
    Application.CutCopyMode = False
    Selection.Delete Shift:=xlUp
    Range("A9").Select
    ActiveCell.FormulaR1C1 = "Value1"
    Range("B3:J3").Select
    ActiveCell.FormulaR1C1 = "Value1"
    Range("A9").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Delete Shift:=xlToLeft
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Was able to successfully do what I wanted to do with this:
Code:
    Dim Person As String    Person = InputBox("Enter your name: FirstName_LastName")
    Application.ScreenUpdating = False
   For I = 4 To (Worksheets.Count())
    Sheets("Template").Select
    Rows("1:8").Select
    Selection.Copy
    ThisWorkbook.Sheets(I).Select
    Rows("1:1").Select
    Selection.Insert Shift:=xlDown
    Rows("9:9").Select
    Application.CutCopyMode = False
    Selection.Delete Shift:=xlUp
    Range("A9").Copy Destination:=Range("B3:J3")
    Range("B5:J5").Value = Person
    Range("A9").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Delete Shift:=xlToLeft
    Cells.Select
    Cells.EntireColumn.AutoFit
    Range("B5:J5").Select
   Next
    Application.ScreenUpdating = True
 
Upvote 0

Forum statistics

Threads
1,223,969
Messages
6,175,680
Members
452,667
Latest member
vanessavalentino83

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