I have taken over an Excel workbook with some complex macros. I am having difficulty working out which cell(s) a particular formula references. The extract from the macro is:
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(INDEX(INDIRECT(RC[-4]&""!rngCost""),MATCH(RC[-3],INDIRECT(RC[-4]&""!rngSku""),0)),0)*RC[-2]"
rngCost references column F; rngSku references column B which is also RC[-4]
I understand IFERROR and the INDEX and MATCH functions but I'm having difficulty with the following:
Which cell does INDIRECT(RC[-4]&""!rngCost"") reference?
Which cell does INDIRECT(RC[-4]&""!rngSku"") reference?
Thanks for your help VisalX
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(INDEX(INDIRECT(RC[-4]&""!rngCost""),MATCH(RC[-3],INDIRECT(RC[-4]&""!rngSku""),0)),0)*RC[-2]"
rngCost references column F; rngSku references column B which is also RC[-4]
I understand IFERROR and the INDEX and MATCH functions but I'm having difficulty with the following:
Which cell does INDIRECT(RC[-4]&""!rngCost"") reference?
Which cell does INDIRECT(RC[-4]&""!rngSku"") reference?
Thanks for your help VisalX