Please, I would appreciate any assistance on how I can use the VLookUp function as the formula for creating the list in the data validation function.
Sub PipFitDes()
Dim j As Integer
LastRow = Sheets("Pipes & Fittings").Range("J" & Rows.Count).End(xlUp).Row
For j = 9 To LastRow
Sheets("Project Costing").Select
If Sheets("Project Costing").Cells(j, "E") <> "" Then
'Ename = Sheets("Project Costing").Cells(j, "E").Value
Sheets("Project Costing").Range("F9:F200").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Application.WorksheetFunction.VLookup("*" & Sheets("Project Costing").Cells(j, "E").Value & "*", Sheets("Pipes & Fittings").Range("H9:J2000"), 3, False)
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
Next j
End Sub
Solved by X. H. in 23 mins