Sub ItemListingsFormulaUpdate()
Dim MainWorksheet As Worksheet, MainTable As ListObject
Dim MainTableFormulaColumn As ListColumn
Dim ItemListingsTable As ListObject, ItemListingsRange As Range
Dim ItemListing As Range
Dim PartsFormula As String, PartsFormulaOrList As String
Set MainWorksheet = ThisWorkbook.Sheets("jhod917") ' Change this
With MainWorksheet
Set MainTable = .ListObjects("Main")
Set ItemListingsTable = .ListObjects("ItemListings")
Set ItemListingsRange = ItemListingsTable.ListColumns(1).DataBodyRange
End With
PartsFormula = "=OR(ISNUMBER(FIND(""" & _
WorksheetFunction.TextJoin(""",[Item Number])),ISNUMBER(FIND(""", _
True, ItemListingsRange) & """,[Item Number])))"
Debug.Print PartsFormula
'' Change "Formula" to name of column that uses the formula
'Set MainTableFormulaColumn = MainTable.ListColumns("Formula")
'MainTableFormulaColumn.DataBodyRange.Formula2 = PartsFormula
' This feels backwards, but show in InputBox for copying
Dim FormulaDisplay As String
FormulaDisplay = InputBox("Please copy formula from box below.", _
"Copy Formula", PartsFormula)
End Sub