Reputation: 239
Getting a type mismatch(run time error 13) on this code and I am unable to solve it.
LastWeek = 10
ActiveCell.FormulaR1C1 = LastWeek + 1
Range(Cells(ActiveCell.Row + 1, ActiveCell.Column), Cells(ActiveCell.Row + 1, _
ActiveCell.Column)).FormulaArray _
= "=INDEX(R2C5:R81C10, MATCH(R4C12&R4C13&R3C15,R1C2:R81C2&R1C3:R81C3&R1C4:R81C4,0)-1,MATCH(R4C14,R1C5:R1C10,0))" / "=INDEX(R2C5:R81C10, MATCH(R4C12&R4C13&R3C15,R1C2:R[72]C2&R1C3:R[72]C3&R1C4:R[72]C4,0)-1, 1)" * 100
I am stuck with this part for a long time now and out of clue to solve it. Any help will be highly appreciated.
Upvotes: 2
Views: 96
Reputation: 172
Why u use quotes in formula text before and after "/" and "*"?
You looking for this formula?
Range(Cells(ActiveCell.Row + 1, ActiveCell.Column), Cells(ActiveCell.Row + 1, _
ActiveCell.Column)).FormulaArray _
= "=INDEX(R2C5:R81C10, MATCH(R4C12&R4C13&R3C15,R1C2:R81C2&R1C3:R81C3&R1C4:R81C4,0)-1,MATCH(R4C14,R1C5:R1C10,0))/INDEX(R2C5:R81C10, MATCH(R4C12&R4C13&R3C15,R1C2:R[72]C2&R1C3:R[72]C3&R1C4:R[72]C4,0)-1, 1) * 100"
Upvotes: 2