Custom Header & Footer
Sub CustomHeader() Dim myText As String myText = InputBox(“Enter your text here”, “Enter Text”) With ActiveSheet.PageSetup .LeftHeader = “” .CenterHeader = myText .RightHeader = “”
Sub CustomHeader() Dim myText As String myText = InputBox(“Enter your text here”, “Enter Text”) With ActiveSheet.PageSetup .LeftHeader = “” .CenterHeader = myText .RightHeader = “”
Sub DateInHeader() With ActiveSheet.PageSetup .LeftHeader = “” .CenterHeader = “&D” .RightHeader = “” .LeftFooter = “” .CenterFooter = “” .RightFooter = “” End With End
Sub UnmergeCells() Selection.UnMerge End Sub Unmerge Cells code simply uses the unmerge options which you have on the HOME tab. The benefit of using this
Sub OpenCalculator() Application.ActivateMicrosoftApp Index:=0 End Sub In Windows, there is a specific calculator and by using this macro code you can open that calculator directly
Sub AutoFitRows() Cells.Select Cells.EntireRow.AutoFit End Sub You can use this code to auto-fit all the rows in a worksheet. When you run this code it
Sub RemoveTextWrap() Range(“A1”).WrapText = False End Sub This code will help you to remove text wrap from the entire worksheet with a single click. It
Sub AutoFitColumns() Cells.Select Cells.EntireColumn.AutoFit End Sub Use above Excel macro code to auto fit rows in all your sheet at once This code quickly auto
Sub InsertMultipleColumns() Dim i As Integer Dim j As Integer ActiveCell.EntireColumn.Select On Error GoTo Last i = InputBox(“Enter number of columns to insert”, “Insert Columns”)
Sub InsertMultipleRows() Dim i As Integer Dim j As Integer ActiveCell.EntireRow.Select On Error GoTo Last i = InputBox(“Enter number of columns to insert”, “Insert Columns”)
Sub AddSerialNumbers() Dim i As Integer On Error GoTo Last i = InputBox(“Enter Value”, “Enter Serial Numbers”) For i = 1 To i ActiveCell.Value =
Welcome to Excel Templates – your ultimate destination for all things related to Excel! We pride ourselves on being a comprehensive, 100% free platform dedicated to providing top-notch, easily editable Excel templates, step-by-step tutorials, and useful macro codes. With fresh templates uploaded daily, we aim to meet every conceivable Excel need you may have. Whether you’re a student, a business professional, or someone looking to make sense of their data, our range of templates has you covered. Dive into the world of Excel Templates today and transform your number-crunching experience into an effortless journey of discovery and efficiency. Join our growing community and elevate your Excel game now.
© 2023 xlsxtemplates all rights reserved