+ Reply to Thread
Results 1 to 6 of 6

Exclude row from SUM and SUMPRODUCT formula

  1. #1
    Registered User
    Join Date
    03-10-2021
    Location
    North Bay, ON
    MS-Off Ver
    MS 2013
    Posts
    3

    Exclude row from SUM and SUMPRODUCT formula

    Hello,

    I am trying to exclude two rows from being added into a calculation. I use the two formulas on a shift schedule to highlight red if our day or night shift has less than 2 people and to highlight green if it has 2 or more people. The formulas are as follows:

    Day:

    =SUMPRODUCT(--(EXACT(C6:C31,{"D"})*{1}))

    Night:

    =SUM(COUNTIF(C6:C31,{"N"})*{1})

    I need to exclude row 12 and 21 from being included in the formula.

    Any help would be greatly appreciated! Thank you!
    Last edited by jaysenoz; 03-10-2021 at 02:45 PM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Exclude row from SUM and SUMPRODUCT formula

    Hi,
    Do you have a sample sheet to upload?
    Look at the yellow banner at the top of the page to see how to attach a workbook.

  3. #3
    Registered User
    Join Date
    03-10-2021
    Location
    North Bay, ON
    MS-Off Ver
    MS 2013
    Posts
    3
    Quote Originally Posted by belinda200 View Post
    Hi,
    Do you have a sample sheet to upload?
    Look at the yellow banner at the top of the page to see how to attach a workbook.
    The workbook should be attached to this reply.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Exclude row from SUM and SUMPRODUCT formula

    Try this :
    D35 and drag to the right:
    =SUM(COUNTIFS(D6:D31,{"N"},$A$6:$A$31,"<>EXCLUDE")*{1})

    D33 and drag to the right:
    =SUMPRODUCT(($A$6:$A$31<>"exclude")*(--(EXACT(D6:D31,{"D","AM","PM"})*{1,0.5,0.5})))

  5. #5
    Registered User
    Join Date
    03-10-2021
    Location
    North Bay, ON
    MS-Off Ver
    MS 2013
    Posts
    3

    Re: Exclude row from SUM and SUMPRODUCT formula

    Quote Originally Posted by belinda200 View Post
    Try this :
    D35 and drag to the right:
    =SUM(COUNTIFS(D6:D31,{"N"},$A$6:$A$31,"<>EXCLUDE")*{1})

    D33 and drag to the right:
    =SUMPRODUCT(($A$6:$A$31<>"exclude")*(--(EXACT(D6:D31,{"D","AM","PM"})*{1,0.5,0.5})))
    That works perfectly. Can you explain how I would add a different row to exclude if I have to in the future?

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Exclude row from SUM and SUMPRODUCT formula

    Add the word "Exclude" in column A like you did in the existing 2....

+ 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. SUMPRODUCT to exclude values?
    By tangcla in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-29-2020, 09:16 AM
  2. [SOLVED] sumproduct exclude header
    By ZedaG in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-17-2017, 10:01 AM
  3. Sumproduct to exclude subtotal(9,...)
    By Sagittarius1978 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-14-2016, 03:00 PM
  4. SUMPRODUCT formula to exclude NA
    By jaybee1967 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-01-2016, 03:47 PM
  5. Replies: 3
    Last Post: 04-21-2015, 07:45 AM
  6. Replies: 3
    Last Post: 06-16-2010, 02:38 AM
  7. Sumproduct Formula - How Do I Exclude Values
    By winnie_shrub in forum Excel General
    Replies: 3
    Last Post: 04-14-2009, 06:32 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