Hi All
macro index and match not working but formula working can someone help
Giving results in column macro 1,1,1,1,1,1,1,1,1,
Formula giving correct results
Formula
macro index and match not working but formula working can someone help
Giving results in column macro 1,1,1,1,1,1,1,1,1,
Formula giving correct results
Code:
Sub testitemised()
Dim LRS As Long
Dim LRW As Long
With Worksheets("Summary Report ")
LRS = .Range("A" & .Rows.Count).End(xlUp).Row
End With
With Worksheets("Workings")
LRW = .Range("A" & .Rows.Count).End(xlUp).Row
.Range("O2:O" & LRW).FormulaArray = _
"=INDEX('Summary Report '!R2C7:R" & LRS & "C7,MATCH(RC[-7]&RC[-6]&RC[-5],'Summary Report '!R2C1:R" & LRS & "C1&'Summary Report '!R2C2:R" & LRS & "C2&'Summary Report '!R2C3:R" & LRS & "C3,0))"
End With
End Sub
Formula
Code:
=INDEX('Summary Report '!$G$2:$G$124,MATCH(H2&I2&J2,'Summary Report '!$A$2:$A$124&'Summary Report '!$B$2:$B$124&'Summary Report '!$C$2:$C$124,0))