Excel File Formatting

Dears,

I have an excel file with Multiple Sheets. Is it possible to make the same formatting (Column, Row lengths, Font Size. complete formatting) of all the Sheets same as any particular Sheet (Sheet Name "231103")..

Actually, number of sheets are high; if i start working one by one it will cosume may be days.

Kindly help,

Regards,
Faisal
 

Attachments

Dears,

I have an excel file with Multiple Sheets. Is it possible to make the same formatting (Column, Row lengths, Font Size. complete formatting) of all the Sheets same as any particular Sheet (Sheet Name "231103")..

Actually, number of sheets are high; if i start working one by one it will cosume may be days.

Kindly help,

Regards,
Faisal
Dear Faisal,
Thanks for posting on our Exceldemy forum. You can easily accomplish that by running the following macro code. I wasn't able to directly write the code on your file as it is password-protected. However, you can paste the following code on your file and run it.

Code:
Sub CopyFormattingToAllSheets()
    Dim sourceSheet As Worksheet
    Dim targetSheet As Worksheet
   
    ' Set the source sheet (the sheet whose formatting you want to copy)
    Set sourceSheet = ThisWorkbook.Sheets("231103")
   
    ' Loop through all sheets in the workbook
    For Each targetSheet In ThisWorkbook.Sheets
        ' Skip the source sheet and the "Summary" Sheet
        If targetSheet.Name <> sourceSheet.Name And targetSheet.Name <> "Summary" Then
            ' Copy formatting from the source sheet to the target sheet
            sourceSheet.Cells.Copy
            targetSheet.Cells.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
            Application.CutCopyMode = False ' Clear the clipboard
        End If
    Next targetSheet
   
End Sub

The macro will copy the formatting of a specific sheet (assigned to the sourceSheet) and paste it to the remaining all the sheets except the Summary sheet.

Kindly paste the code on your file after providing the password. Then, run the code to check whether it works. Please don't hesitate to contact us if you need further assistance.

Regards
Aniruddah
Team Exceldemy
 

Online statistics

Members online
0
Guests online
5
Total visitors
5

Forum statistics

Threads
371
Messages
1,627
Members
705
Latest member
curioso
Back
Top