+ Reply to Thread
Results 1 to 10 of 10

Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

  1. #1
    Registered User
    Join Date
    05-15-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    5

    Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Hi All,

    I am trying to add number of days based on a period and a category. My criteria ranges (Category and Period) and Data are on one tab and vertical. My criterias are on a seperate tab on the spreadsheet with "Category" being vertical and "Period" being horizontal.

    I have tried to use both of the SUMIF and SUMProduct formulas but none of these work and are bringing an error that I am unable to correct. The formatting of the cells are similar so that would not be the issue I think.

    =SUMIFS(Timesheet!R6:R673,Timesheet!P6:Q673,Summary!B4:B62,Timesheet!J6:L673,Summary!C3:AO3)
    =SUMPRODUCT(Timesheet!P6:Q673=Summary!B4)*(Timesheet!J6:L673=Summary!$C$3)*Timesheet!R6:R673

    Please can you help?

    Thanks a Lot

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    SUMIFS won't work because your ranges are not the same size, and you are missing some brackets in the SUMPRODUCT:

    =SUMPRODUCT((Timesheet!P6:Q673=Summary!B4)*(Timesheet!J6:L673=Summary!$C$3)*Timesheet!R6:R673)
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    05-15-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    5

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Hi Rorya,

    Thanks for this.

    Now I have updated the SUMPRODUCT formula however I have an NA error now.

    With regards to the SUMIF, I have the same range sizes (row 6 to row 673)so I am unsure.

    I have tried now the below formula with arrays but the formula is only working on the first column, the remaining ones are not updating.

    =SUM((Timesheet!P6:P673=Summary!B4)*(Timesheet!J6:L673=Summary!$C$3)*(Timesheet!R6:R673))


    Thank you

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    You have the same number of rows, but different numbers of columns.

    I suggest you follow the earlier advice and post your workbook, please.

  6. #6
    Registered User
    Join Date
    05-15-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    5

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Ok Please find attached a sample file.

    Thanks
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-15-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    5

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Thank you!

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Looks like all you need is:

    =SUMIFS('sheet 1'!R6:R673,'sheet 1'!$P$6:$P$673,$B4,'sheet 1'!$J$6:$J$673,C$3)

    in C4, and then copy across and down as needed.

  9. #9
    Registered User
    Join Date
    05-15-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    5

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    Thank you Rorya, it works now.

    Kind Regards

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Value Error Excel SUMIF and SUMProduct formulas horizontal & vertical criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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: 6
    Last Post: 11-03-2018, 04:50 AM
  2. [SOLVED] SumIfs / Sumproduct for table with vertical and horizontal lookup criteria (text+dates)
    By benvass in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2018, 10:34 AM
  3. [SOLVED] Excel 15.39, Horizontal and Vertical error bars.
    By Bruhhhhhhhh in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-03-2017, 01:00 PM
  4. Sumproduct with criteria horizontal and vertical and > than
    By krunk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2017, 11:37 AM
  5. [SOLVED] Sumif 2 criterias one horizontal with duplicates and 1 vertical
    By Mengo85 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-26-2015, 01:23 PM
  6. Sumproduct with horizontal and vertical criterion
    By Will31 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2012, 09:59 AM
  7. Replies: 2
    Last Post: 04-06-2011, 10:08 AM

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