makeitwork09
Technical User
The following is a snippet of VBA code using Excel 2007
I was expecting that following pulled from above would change for each row like it does when using the formula property, but for the formula array it stays as F2 & N2 (relative references) for each row in the range. Is that because I should be using the R1C1 reference style instead? If not, how can change this so that
the row number for the portion below will change on each row?
Note that the variables are anyone of the following A1 reference style cell letters, ranges, or column numbers.
Thanks
Code:
.Range(.Cells(2, FNRemCol + 1), .Cells(FNRemRow, FNRemCol +
1)).FormulaArray = "=IF(ISNA(INDEX(" & FNCCurtAdr & ",MATCH(" & FNRInvLnNo & "2&" & FNRPrinBal & "2," & FNCLoanNumAdr & "&" & FNCPrinBalAdr & ",0)," & FNCurtCol + 1 & ")),0,INDEX(" & FNCCurtAdr & ",MATCH(" & FNRInvLnNo & "2&" & FNRPrinBal & "2," & FNCLoanNumAdr & "&" & FNCPrinBalAdr & ",0)," & FNCurtCol + 1 & "))"
I was expecting that following pulled from above would change for each row like it does when using the formula property, but for the formula array it stays as F2 & N2 (relative references) for each row in the range. Is that because I should be using the R1C1 reference style instead? If not, how can change this so that
the row number for the portion below will change on each row?
Code:
FNRInvLnNo & "2&" & FNRPrinBal & "2
Note that the variables are anyone of the following A1 reference style cell letters, ranges, or column numbers.
Thanks