+ Reply to Thread
Results 1 to 7 of 7

Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

  1. #1
    Registered User
    Join Date
    11-07-2022
    Location
    USA
    MS-Off Ver
    Office 365 2206
    Posts
    4

    Exclamation Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Hello Folks,

    I've included a workbook with sample data as well as expected highlighting/conditional formatting to occur.

    The criteria is as follows:
    Highlight if sum of column D (SOLD) for a single person listed in Column A (INITIALS) is greater than 100 WHILE.
    Exemption: ANY rows which may contain "DONE" in column E (VERIFY)

    EXCEPTION: If the person in column A (INITIALS) only has ONE non-"DONE" row assigned, DO NOT highlight.


    NOTE: You can SORT Column A in the "Expected OUTPUTEFFECT" sheet to better arrange and see the desired effect better.

    I'm looking for both a DYNAMIC Range and a STATIC Range formula (I hope that's good wording).
    The amount of rows per day in my case can fluctuate day to day from anything between 100-1000. For example, the static formula should consider the range A1:F1000 for highlighting; while the dynamic one should probably just be $A:$F

    The following dynamic formula KIND OF work, but eventually DIDN'T and absolutely takes a long time to process thus my request for a more STATIC range formula as well. (I'm bad at making these things work haha)
    Please Login or Register  to view this content.
    (Hope I hand-typed that well)

    environment: Using Office 365, and uploading to SharePoint for teams use.

    Thanks in advance to all who participate!
    Attached Files Attached Files
    Last edited by Zelminar; 11-08-2022 at 01:46 PM. Reason: RESOLVED

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,426

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    The logic in your formula is clsoe - But when you apply the CF, just select the first row A2:F2 of your table, and use the formula

    =AND($E2<>"DONE",SUMIFS($D:$D,$A:$A,$A2,$E:$E,"<>DONE")>100,COUNTIFS($A:$A,$A2,$E:$E,"<>DONE")>1)

    Then copy A2:F2 and paste formats over the rest of your data - DO NOT apply CF to the entire column - that is 6,000,000+ formulas that need to be calculated (and is why your sheet was so slow).

    Note, too, that in your example output, there you also had some DONE cells with an extra space: "DONE " is not equal to "DONE" so use Data Validation on those cells.
    Last edited by Bernie Deitrick; 11-07-2022 at 05:57 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    11-07-2022
    Location
    USA
    MS-Off Ver
    Office 365 2206
    Posts
    4

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Quote Originally Posted by Bernie Deitrick View Post
    The logic in your formula is clsoe - But when you apply the CF, just select the first row A2:F2 of your table, and use the formula

    =AND($E2<>"DONE",SUMIFS($D:$D,$A:$A,$A2,$E:$E,"<>DONE")>100,COUNTIFS($A:$A,$A2,$E:$E,"<>DONE")>1)

    Then copy A2:F2 and paste formats over the rest of your data - DO NOT apply CF to the entire column - that is 6,000,000+ formulas that need to be calculated (and is why your sheet was so slow).

    Note, too, that in your example output, there you also had some DONE cells with an extra space: "DONE " is not equal to "DONE" so use Data Validation on those cells.
    Thanks so much! It was the "DONE " which was throwing me for a loop; I didn't think about that possibility. Thanks for the extra set of eyes and adding that
    Please Login or Register  to view this content.
    bit; I forgot to add that bit from my hand type. I now have added data validation using a range table (of 1 cell) so that I may bypass case sensitivity; seems there was no option within the data validation itself.

    It seems even with the limited CF Range 1:500(rows), it still is a bit slow Would you happen to have any suggestions for optimizing efficiency? (Hopefully without the obvious, "Reduce the CF Range from 500 to exactly what you need" - trying to keep it somewhat dynamic regardless of data size)
    Last edited by Zelminar; 11-07-2022 at 07:35 PM.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,426

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Quote Originally Posted by Zelminar View Post
    Would you happen to have any suggestions for optimizing efficiency? (Hopefully without the obvious, "Reduce the CF Range from 500 to exactly what you need" - trying to keep it somewhat dynamic regardless of data size)

    An easy thing is to only format one column (instead of 6) using the CF, or to not use CF at all, and add a column with the CF formula and then use that column as a filter (or use CF on that column to highlight TRUE values).

  5. #5
    Registered User
    Join Date
    11-07-2022
    Location
    USA
    MS-Off Ver
    Office 365 2206
    Posts
    4

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Oh, so when I decided to highlight the rows (6 column width) is that making the TRUE/FALSE calculation 6 times greater? Am I understanding that right? I could certainly give that a shot (only highlighting one column)
    Last edited by Zelminar; 11-08-2022 at 12:10 PM.

  6. #6
    Registered User
    Join Date
    11-07-2022
    Location
    USA
    MS-Off Ver
    Office 365 2206
    Posts
    4

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Quote Originally Posted by Bernie Deitrick View Post
    An easy thing is to only format one column (instead of 6) using the CF, or to not use CF at all, and add a column with the CF formula and then use that column as a filter (or use CF on that column to highlight TRUE values).
    Thanks, again, so much Bernie! I did go ahead and reduce the amount of columns to be CF'd and that did seem to reduce the lag by quite a bit. I'll be sticking to just CF'ing 1 column! I think we're all resolved here. Cheers! Big thanks, truly.

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,426

    Re: Conditional Formatting Formula - Multiple Criteria - SUM, COUNT, Exemption, exception

    Every cell's CF formula gets calculated separately, so minimizing CF helps with the calculational overhead.

+ 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. [SOLVED] formula for multiple criteria with an exception
    By vani2004 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-20-2022, 12:33 PM
  2. Replies: 1
    Last Post: 12-09-2019, 10:55 PM
  3. [SOLVED] Conditional Formatting formula to highlight a column if multiple criteria are not met.
    By KMJ256388 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-15-2018, 09:36 AM
  4. [SOLVED] Formula to Index match multiple criteria with conditional formatting for leave calendar
    By meckenzie2012 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-19-2016, 02:22 PM
  5. Conditional Row formatting with an Exception
    By CeruleanSplash in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2013, 10:30 AM
  6. Replies: 8
    Last Post: 03-22-2013, 03:40 PM
  7. [SOLVED] Formula for Multiple Criteria in Conditional Formatting
    By excelheaven in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2013, 10:52 PM

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