Try this
Option Explicit
Sub Format()
Dim rName As Range, rNames As Range
Dim aryNames As Variant
Dim sNames As String
Set rNames = Worksheets("Sheet3").Range("A1:A3") ' <<<<<<<<< Change
aryNames = Application.WorksheetFunction.Transpose(rNames)
sNames = Join(aryNames, "#")
With Worksheets("Input File")
Set rName = .Cells(.Rows.Count, 3).End(xlUp)
Do While rName.Row > 1
If InStr(sNames, rName.Value) > 0 Then
With rName
.EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
.EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
With .Offset(-2, -1).Resize(1, 3).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
End With
Set rName = rName.Offset(-3, 0)
Else
Set rName = rName.Offset(-1, 0)
End If
Loop
End With
End Sub