I import worksheets This_ws and Ref_ws, each from a separate workbook, into a master workbook,
I create the following equation in This_ws in the master workbook.
The code that creates the equation in This_ws is:
Range(Cells(2, 15), Cells(LastRow, 15)).Formula = "=INDEX(Ref_ws!H:H,MATCH(This_ws1!B:B,Ref_ws!B:B,0))"
The problem is that, if Ref_ws exists when I open the workbook and I try and run the macro to import and populate the equation in This_ws, the equation yields an #N/A (value not found) error.
I have to always import the Ref_ws (even if it already exists in the master workbook) and THEN run the macro to import and populate This_ws for the equation to work.