Results 1 to 8 of 8

Thread: #VALUE! Error for Single Criterion Sumproduct Function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,733
    Location
    The issue is that you cannot perform array comparisons like that in VBA.

    I would suggest you redo the calculations using Evaluate:

    wc.Cells(2, 4) = ws.Evaluate("SumProduct(--(Month(AN2:AN" & lastRow & ")=2)")
    for example
    Be as you wish to seem

  2. #2
    Thanks for replying! Unfortunately, when I copied in your example above, it's still gave me a Value Error. I also tried adding "Application." ahead of the Sumproduct function, but that produced the same result. Any thoughts on this would be much appreciated. I've been banging my head against the wall on this one for days.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •