VBA - SumIfs with Or

前端 未结 2 1784
鱼传尺愫
鱼传尺愫 2020-12-22 08:35

I have researched this issue everywhere, and I can\'t find an answer to my particular situation.

Here\'s my SumIfs statement.

B_white = Application.S         


        
相关标签:
2条回答
  • 2020-12-22 08:44
    B_white = Application.Sum(Application.SumIfs(Range("G84:G" & LastRow), Range("G84:G" & LastRow), "1", Range("K84:K" & LastRow), "B*", Range("L84:L" & LastRow), Array("2 (test)", "2")))
    
    0 讨论(0)
  • 2020-12-22 09:08

    You can try Sumproduct with an array-version of SumIfs:

    B_white = Application.SumProduct(Application.SumIfs(Range("G84:G" & LastRow), _
        Range("G84:G" & LastRow), "1", Range("K84:K" & LastRow), "B*", _
        Range("L84:L" & LastRow), Array("2", "2 (test)")))
    
    '                             ^^^^^^^^^^^^^^^^^^^^^^
    
    0 讨论(0)
提交回复
热议问题