Concat multiple MATCH criteria in Excel VBA

前端 未结 3 763
挽巷
挽巷 2020-12-18 15:06

So in Excel, we know it\'s possible to test against multiple criteria via concatenation, like this:

MATCH(criteria1&criteria2, Range(), 0)
3条回答
  •  佛祖请我去吃肉
    2020-12-18 15:43

    You still need to send the MATCH argument body as a string. The '+' does not concatenate.

    WorksheetFunction.Match(criteria1 & "&" & criteria2, Range(), 0)
    

    Should concatenate the two values and execute the match.

提交回复
热议问题