You are on page 1of 1

Sub est()

Dim strDept As String


strDept = InputBox("Please enter the department name", "Enter Department")
Range("I14").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(C[-3],'" & strDept & "'!C1:C5,4,0)"
Selection.AutoFill Destination:=Range("I14:I1000"), Type:=xlFillDefault
End Sub

You might also like