Sub est() selects a Range and fills it with department names. If a department name isn't in the range, it will be filled with the department's name. The department name must be in the Range from i14 to i1000.
Sub est() selects a Range and fills it with department names. If a department name isn't in the range, it will be filled with the department's name. The department name must be in the Range from i14 to i1000.
Sub est() selects a Range and fills it with department names. If a department name isn't in the range, it will be filled with the department's name. The department name must be in the Range from i14 to i1000.
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