+ Reply to Thread
Results 1 to 11 of 11

Counting Red Text Colour, When Applied by Conditional Formatting

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Exclamation Counting Red Text Colour, When Applied by Conditional Formatting

    Hello,

    I have a spreadsheet that is used for testing equipment. In the G column it has a list of the expiry dates for the equipment to be tested.

    I've used Conditional Formatting to change the font to Orange (when it will expire in 30 days or less) and Red (when a service is overdue.)

    This are the conditional formatting formulas:
    Please Login or Register  to view this content.
    &
    Please Login or Register  to view this content.
    What I want to do is to count all of the items that have turned red. So I can see how many will need to be tested. This is going to be a big spreadsheet so I can't just count manually and risk missing things out.

    Is there anyway of achieving this, preferrably without VBA?

    My sample spreadsheet wont attach for some reason so will try again later!

    Any help would be amazing!
    Last edited by Antligen; 06-26-2014 at 11:39 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Use Countif() function

    =COUNTIF(A:A,NOW()+30)

    =COUNTIF(A:A,NOW())

    Or

    =COUNTIF(A:A,NOW()+30)+COUNTIF(A:A,NOW())

    Or

    To count >=now() and <=now()+30

    =COUNTIFS(A:A,">="&NOW(),A:A,"C="&NOW()+30)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Hi,

    I can't see how either of your CFs are working. NOW() returns a decimal number that can be interpreted as a date & time.

    You would need to use

    =A1=TODAY() ' for red and
    =A1<TODAY+30 ' for orange

    in that order if you want to work with just the date.

    For your count of the red cell then simply use the same logic as the conditional format setting, i.e.
    =COUNTIF(A:A,TODAY())
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Sorry,

    I didn't copy the conditional formatting properly

    It is done as follows:

    Format only cells that contain - Cell Value - Less than - =NOW()

    and the same with the other, just with =NOW()+30

    Does that change anything you have previously stated?

    I've also just tried both formulas offered and the answer comes back as 0.
    Last edited by Antligen; 06-26-2014 at 10:49 AM.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Hi,

    With the two CFs I gave you you should be using the 'Formula is.....(last) option.

    In addition and as I said, use TODAY() rather than NOW()

  6. #6
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Again, not working

    I'm sure it's me, naturally, but perhaps it has something to do with the formula stating "A1" in?

    The column that contains the dates that need to change to red are G7:G17.

    If possible could you rephrase the formula so that I can see how best to write it?

    Many thanks

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Hi,

    Upload the workbook and I'll change it for you.

  8. #8
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    tester spreadsheet.xls

    Here is a tester spreadsheet with my Conditional Formatting as well.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Hi,
    See attached.

    You were still using the Cell Value option rather than the Formula option.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Ok I can see how you've used the formula option... but where is the countif formula? I've tried using the formula you gave:

    Please Login or Register  to view this content.
    However the answer still comes back as 0?

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Counting Red Text Colour, When Applied by Conditional Formatting

    Have you tried

    =COUNTIF($F:$F,"<="&TODAY())

    if you want the count of all dates which are <= today rather than just equal to today.

+ 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: 1
    Last Post: 09-10-2013, 10:28 PM
  2. [SOLVED] Conditional Formatting, Changing Colour of Text
    By MatthewIJClark in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2013, 11:58 AM
  3. Replies: 4
    Last Post: 12-21-2011, 11:32 AM
  4. Replies: 2
    Last Post: 06-21-2010, 03:31 PM
  5. [SOLVED] counting cells with conditional formatting applied
    By HalB in forum Excel General
    Replies: 3
    Last Post: 02-21-2005, 10:06 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