SUMPRODUCT error

Karl Heine 0 Reputation points
2026-01-18T14:59:36.73+00:00

User's image

=SUMPRODUCT((M1:HU1="hour")*(M5:HU5))

its giving me a value error and I cant seem to figure out why, or is there a better way of getting the sum of the total month?

User's image

=SUMPRODUCT(($K$1:$CJ$1="out")*(K5:CJ5))

it works on this sheet, so I'm confused.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Hendrix-C 10,195 Reputation points Microsoft External Staff Moderator
    2026-01-18T17:04:47.79+00:00

    Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.


    Hi @Karl Heine,

    Thank you for posting your question in the Microsoft Q&A forum.

    Based on your sharing, the issue can be due to the selected range M1:HU1 is not all numeric, some cells contain error or text values. You can quick check your data range by using these formulas:

    • For errors: =SUMPRODUCT(--ISERROR(M5:HU5))
    • For text: =SUMPRODUCT(--ISTEXT(M5:HU5))

    If any of these formulas returns value that >0, that's the problem causing SUMPRODUCT returning VALUE error.

    I hope this helps you move forward smoothly. If you have any questions or need further assistance, please feel free to share them in the comments on this post so I can continue to support you.  

    Thank you for your patience and understanding. Looking forward to your response.  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Barry Schwarz 5,176 Reputation points
    2026-01-18T18:29:30.47+00:00

    This occurs if there is a non-empty cell containing a non-numeric value somewhere in M5:HU5 SUMPRODUCT does not automatically convert these values to zero. The solution is to replace the second expression with N(M5:HU5). The N function forces non-numeric value to 0 before SUMPRODUCT uses them..

    0 comments No comments

  3. Ashish Mathur 101.3K Reputation points Volunteer Moderator
    2026-01-18T23:00:38.4633333+00:00

    Hi,

    Delete any non-numeric entries present in range M5:HU5

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.