How to pass variables to an double match function in VBA

后端 未结 2 1858
独厮守ぢ
独厮守ぢ 2021-01-23 15:08

I have a bunch of rows and 25 columns in a worksheet, and need to find the value in the 4th column based on columns B and C using VBA. I am using a combination of index and mult

2条回答
  •  隐瞒了意图╮
    2021-01-23 15:21

    If I understand correctly, I think your syntax was just off slightly - you omitted some ampersands and overlooked the rule about doubling up the quotes. Also no need to Select.

    Range("G27").FormulaArray = "=index(A2:G27,match(1,(B2:B27=""" & SA & """)*(C2:C27=""" & C1 & """),0),4)"
    

提交回复
热议问题