Hello again,
I am looking to add to my already created macro. This Macro is just strictly for formating a report I run daily to look pretty. I need it to insert a row based on groups of locations in Column F.
I will attach an example of my report and below is my current code.
Sub InspectionMacro()
'
' InspectionMacro Macro
' Make the spread sheet pretty.
'
' Keyboard Shortcut: Ctrl+e
'
Range("A2").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.Copy
Range("A3:A68").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-12
Range("I2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Range("A2").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("G2").Select
ActiveCell.FormulaR1C1 = "Phone call made to:"
Range("H2").Select
ActiveCell.FormulaR1C1 = "Date-Time"
Range("I2").Select
ActiveCell.FormulaR1C1 = "Comments"
Range("J2").Select
ActiveCell.FormulaR1C1 = "Follow up email sent"
Cells.Replace What:="'", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Cells.Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Columns.AutoFit
Range("A1:J1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
ActiveCell.FormulaR1C1 = "Inspections Not Done - Vehicle Currently Driving"
Rows("1:2").Select
Selection.Font.Bold = True
Range("G3").Select
End Sub
Bookmarks