Hi folks
I'm trying to create a VBA function which generates quite a complex formula if there's a particular value in Cell G25. Can anyone help please?
My formula is:
=IF(G25="46mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$G$5>=I25)/(Matrix!$C$5:$G$5>=I25))*COLUMN(Matrix!$C$5:$G$5),1)),IF(G25="67mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$K$5>=I25)/(Matrix!$C$5:$K$5>=I25))*COLUMN(Matrix!$C$5:$K$5),1)),IF(G25="90mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$G$5>=I25)/(Matrix!$C$5:$G$5>=I25))*COLUMN(Matrix!$C$5:$G$5),1)))))+AL25
I'm currently using the above formula in Cell AG25 but it's generating a #VALUE! error where there's no content in cell G25.
I'm trying to create a VBA function which generates quite a complex formula if there's a particular value in Cell G25. Can anyone help please?
My formula is:
=IF(G25="46mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$G$5>=I25)/(Matrix!$C$5:$G$5>=I25))*COLUMN(Matrix!$C$5:$G$5),1)),IF(G25="67mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$K$5>=I25)/(Matrix!$C$5:$K$5>=I25))*COLUMN(Matrix!$C$5:$K$5),1)),IF(G25="90mm",INDEX(Matrix!A:K,AGGREGATE(15,3,((Matrix!$B$6:$B$13>=M25)/(Matrix!$B$6:$B$13>=M25))*ROW(Matrix!$B$6:$B$13),1),AGGREGATE(15,3,((Matrix!$C$5:$G$5>=I25)/(Matrix!$C$5:$G$5>=I25))*COLUMN(Matrix!$C$5:$G$5),1)))))+AL25
I'm currently using the above formula in Cell AG25 but it's generating a #VALUE! error where there's no content in cell G25.