alkatraz
alkatraz

Reputation: 5

convert to application.worksheetfunction.sumproduct

can someone convert this formula SUMPRODUCT(--(A:A>B:B))?

A:A and B:B are worksheet

this must count the number of cells less than in column b

application.worksheetfunction.sumproduct

Thanks!

Upvotes: 0

Views: 302

Answers (1)

Gary's Student
Gary's Student

Reputation: 96753

Use Evaluate()

Sub lexation()
    Dim v As Variant
    v = Evaluate("SUMPRODUCT(--(A:A>B:B))")
    MsgBox v
End Sub

For example:

enter image description here

Upvotes: 1

Related Questions