I am trying to put a FormulaArray in many rows in my workbook. My code is as follows:
Range("E11:E81").FormulaArray = "=IF(D11<>"""",IFERROR(INDEX(WSMASTER!$B$2:$B$3980,MATCH(1,(B11=WSMASTER!$C$2:$C$3980)*(D11=WSMASTER!$A$2:$A$3980),0)),""ERROR - this is not a valid!""),"""")"
The problem with this code is that it copies from E11 to E81 and the cell references dont change from 11. For example the formula in cell E12 should be:
{=IF(D12<>"",IFERROR(INDEX(WSMASTER!$B$2:$B$3980,MATCH(1,(B12=WSMASTER!$C$2:$C$3980)*(B12=WSMASTER!$A$2:$A$3980),0)),"ERROR - this is not a valid!"),"")}
Is there a way of changing the code so that from cell E11 to E81, the references highlighted in red above change with it?
Please can anyone help me?
Many thanks for taking the time to read post.
Range("E11:E81").FormulaArray = "=IF(D11<>"""",IFERROR(INDEX(WSMASTER!$B$2:$B$3980,MATCH(1,(B11=WSMASTER!$C$2:$C$3980)*(D11=WSMASTER!$A$2:$A$3980),0)),""ERROR - this is not a valid!""),"""")"
The problem with this code is that it copies from E11 to E81 and the cell references dont change from 11. For example the formula in cell E12 should be:
{=IF(D12<>"",IFERROR(INDEX(WSMASTER!$B$2:$B$3980,MATCH(1,(B12=WSMASTER!$C$2:$C$3980)*(B12=WSMASTER!$A$2:$A$3980),0)),"ERROR - this is not a valid!"),"")}
Is there a way of changing the code so that from cell E11 to E81, the references highlighted in red above change with it?
Please can anyone help me?
Many thanks for taking the time to read post.