Hello all,
I have been banging my head against the wall trying to figure out why I am getting this error. I have checked to make sure the data types are the same in the cells and have been looking all over the internet to try and find some clue, but to no avail. ANY direction would be helpful! I turned the text red where it is giving me the Run-time error '1004': Unable to get the Find property of the worksheetfunction class.
Sub Table_Relations()
Range("E2").Select
EndRow = ActiveCell.End(xlDown).Row
Set TableID = Range("E2:E" & EndRow)
Set TR = Range("G2:G" & EndRow)
Set SearchRange = Range("D2:D" & EndRow)
Total_Tables = TableID.Count
For i = 1 To Total_Tables
MyTable = Application.WorksheetFunction.Index(TableID, i, 1).Value
For j = 1 To Total_Tables
On Error GoTo FixIt
SearchTable = Application.WorksheetFunction.Index(SearchRange, j, 1).Value
AddTable = Application.WorksheetFunction.Index(TableID, j, 1).Value
If Application.WorksheetFunction.Find(MyTable, SearchTable, 1) > 0 Then
If Application.WorksheetFunction.Index(TR, i, 1).Value = "" Then
Application.WorksheetFunction.Index(TR, i, 1).Value = AddTable
Else
Application.WorksheetFunction.Index(TR, i, 1).Value = _
Application.WorksheetFunction.Index(TR, i, 1).Value & ", " & AddTable
End If
End If
FixIt:
Next
Next
End Sub
Bookmarks