I'm trying to place a formula in a range of cells using VBA. I have written the formula to do this and it works great, however, I would like to the formula to be dynamic. The range of data in which the formula searches is variable.
I want to do a use End(xlUp) to determine the range. The code I have is the following:
Range("P43").FormulaArray = "=IFERROR(INDEX(Input Tigerlijst!$A$2:$A$247,MATCH(1,--(SEARCH(TRANSPOSE(Input Tigerlijst!$A$2:$A$247),O43)>0),0),0),"""")"
What I think is the solution is:
Range("P43").FormulaArray = "=IFERROR(INDEX(Input Tigerlijst!$A$2:*LastRow*,MATCH(1,--(SEARCH(TRANSPOSE(Input Tigerlijst!$A$2:*LastRow*),O43)>0),0),0),"""")"
I've been searching and trying for hours, help would be greatly appreciated.