+ Reply to Thread
Results 1 to 6 of 6

Sumif function? Two variables return error #VALUE

  1. #1
    Registered User
    Join Date
    06-03-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    8

    Question Sumif function? Two variables return error #VALUE

    Hi everyone,

    I am trying to automatize a staffing sheet where people fill in occupation by hour and position. Since it will likely cover multiple sites, I want to include a total at the bottom where people can switch between sites easily.

    For some reason, I get a VALUE error when trying the sumif function with multiple variables (see cell F69 in attached doc).

    The regular sumif function works fine but does not allow for a second variable.

    Thanks for the help!
    Attached Files Attached Files
    Last edited by Mrkumbo; 05-02-2018 at 08:52 AM. Reason: Wrong attachment

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sumif function? Two variables return error #VALUE

    Try

    =SUMPRODUCT((DJ$8:DM$60)*($B$8:$B$60="Cook/Baker"))

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Sumif function? Two variables return error #VALUE

    The ranges all have to be the same size for SUMIFS. Why not use SUMIF, as you only seem to have one criteria?

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-03-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    8

    Re: Sumif function? Two variables return error #VALUE

    Sorry, wrong attachment was enclosed: I am trying to have 2 variables here (position in column B, site in column C).

    Site is in cell B68, while positions are from B69 to B74.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sumif function? Two variables return error #VALUE

    Try

    =SUMPRODUCT((DJ$8:DM$60)*($B$8:$B$60="Cook/Baker")*($C$8:$C$60=$B$68))

  6. #6
    Registered User
    Join Date
    06-03-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    8

    Re: Sumif function? Two variables return error #VALUE

    Works like a charm, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 06-21-2017, 06:32 PM
  2. SUMIF combine with different file return VALUE error
    By greg151091 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2017, 03:39 PM
  3. [SOLVED] Return next date and sumif error.
    By kborgers in forum Excel General
    Replies: 7
    Last Post: 11-28-2014, 11:32 AM
  4. SUMIF Function but with text results and variables
    By billyshears in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 10:58 AM
  5. need SUMIF to return error when text is present
    By carsto in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2012, 03:43 PM
  6. Multiple Variables - Sumif error
    By gustavo.simoes1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-21-2009, 09:07 AM
  7. return 2 or more variables from a function
    By David Adamson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2005, 01:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1