+ Reply to Thread
Results 1 to 10 of 10

Counting conditionally formatted cells which are blank?

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Counting conditionally formatted cells which are blank?

    Hi forum,

    On the UMMS BC Labour Input, I have certain cells which are conditionally formatted.

    Is there a way to count those cells which do not have a value in the cell?

    So for example on row 2 from columns D to AP there are 9 cells which are conditionally formatted and out of those 9, 1 has a value of 0.

    What forumula will return the number 8 for the other formatted blank cells?

    Thanks in advance

    Andrew
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Counting conditionally formatted cells which are blank?

    You can't use CF applied in formula.

    You have to use underlying logic/calculation in your formula.
    Ex:
    =COUNTIFS('UMMS BC Labour Matrix'!C2:AO2,1,'UMMS BC Labour Input'!D2:AP2,"=")

    Edit: Woops. Formula should be...
    =COUNTIFS('UMMS BC Labour Matrix'!C2:AO2,1)-COUNTIFS(D2:AP2,"<>")
    Last edited by CK76; 07-07-2020 at 10:16 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Counting conditionally formatted cells which are blank?

    You will need to base the count on the source sheet - you can't count formatting.
    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.

  4. #4
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Counting conditionally formatted cells which are blank?

    Many thanks CK76, excellent work

  5. #5
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Counting conditionally formatted cells which are blank?

    Quote Originally Posted by CK76 View Post
    You can't use CF applied in formula.

    You have to use underlying logic/calculation in your formula.
    Ex:
    =COUNTIFS('UMMS BC Labour Matrix'!C2:AO2,1,'UMMS BC Labour Input'!D2:AP2,"=")

    Edit: Woops. Formula should be...
    =COUNTIFS('UMMS BC Labour Matrix'!C2:AO2,1)-COUNTIFS(D2:AP2,"<>")
    Hi CK76, are you sure the edit is correct? The first one appears to give the right answer

  6. #6
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Counting conditionally formatted cells which are blank?

    Funny - I seem not to exist.

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Counting conditionally formatted cells which are blank?

    Edit is correct. First one will give wrong answer.

    See attached. I've assumed that you won't have values in cells where CF evaluates to false.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Counting conditionally formatted cells which are blank?

    Sorry AliGW, I hadnt seen your response when I replied to CK

  9. #9
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Counting conditionally formatted cells which are blank?

    No worries - I was just having an existential crisis.

  10. #10
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Counting conditionally formatted cells which are blank?

    Thankyou both

+ 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] Counting Conditionally-Formatted Cells in a Row
    By eNinjaInTraining in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-27-2020, 03:33 PM
  2. [SOLVED] Counting Conditionally Formatted Coloured Cells
    By Tiraenus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2018, 08:03 PM
  3. Counting coloured cells that are conditionally formatted
    By vmutch in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-24-2015, 02:46 PM
  4. counting conditionally formatted cells
    By chop924 in forum Excel General
    Replies: 3
    Last Post: 05-09-2012, 11:44 AM
  5. Counting cells conditionally formatted, by colour
    By edwar368 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2011, 05:30 PM
  6. Counting by conditionally formatted cells
    By genus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-23-2009, 05:42 AM
  7. Counting conditionally formatted cells
    By Nigel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-27-2008, 04:00 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