I have the following function code
=IF(MAX(IF(ISNUMBER(SEARCH($A2,Sheet2!$A$2:$E$5000)),ROW(Sheet2!$A$2:$E$5000))),INDEX(Sheet2!M:M,MAX(IF(ISNUMBER(SEARCH($A2,Sheet2!$A$2:$E$5000)),ROW(Sheet2!$A$2:$E$5000)))),"")
listed in cell V2 on sheet 1. After that is placed i then run the following macro for an autofill.
Sub Autofill()
Range("V2").Autofill Range("V2:V" & Range("A" & Rows.Count).End(xlUp).Row)
End Sub
The problem I'm running into is that the pasting of the function and the autofill are not working correctly and I do not know why. The corresponding cells that are suppose to increase with the autofill are not increasing. It should be A2 for row 2 and A3 for row 3 and so on. Any suggestions are greatly appreciated.
Bookmarks