+ Reply to Thread
Results 1 to 9 of 9

Counting conditionally formatted font color not pre-formatted font color

  1. #1
    Registered User
    Join Date
    01-09-2016
    Location
    U.S
    MS-Off Ver
    10
    Posts
    5

    Counting conditionally formatted font color not pre-formatted font color

    I have a set of cells that have a number and the font is pre-formatted to black but will conditionally change
    to white when the condition of a number matching another cell is met.

    I'm trying to count the font color of cells that have a conditional format of white not the preformatted color of black.

    I did make a file in excel if someone wants to sees it,

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Counting conditionally formatted font color not pre-formatted font color

    This solution changes the conditional formatting rule then counts the occurances where a number's font is white.
    The conditional formatting rule is =C8=O8 which is applied to C8:G8
    The formula that does the counting is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The attached file shows how this works.
    Let me know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    01-09-2016
    Location
    U.S
    MS-Off Ver
    10
    Posts
    5

    Re: Counting conditionally formatted font color not pre-formatted font color

    for some reason, the copy file wouldn't download properly, it was saying the file couldn't be found

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Counting conditionally formatted font color not pre-formatted font color

    Downloaded fine for me, however I'll re-attach.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-09-2016
    Location
    U.S
    MS-Off Ver
    10
    Posts
    5

    Re: Counting conditionally formatted font color not pre-formatted font color

    the code worked perfectly but now I've expanded my sheet to include more salespeople and daily sales stats

    I just need the ranges to be unlimited, I tried to expand the last ranges and it didn't go well.

    Guess I can't attach a file,

    send your email and i'll email the file, looks like I can only attach a file once

  6. #6
    Registered User
    Join Date
    01-09-2016
    Location
    U.S
    MS-Off Ver
    10
    Posts
    5

    Re: Counting conditionally formatted font color not pre-formatted font color

    got it figured out, here's the file
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Counting conditionally formatted font color not pre-formatted font color

    Not at all elegant however it works, which is after all the bottom line. Paste the following formula in O7 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.

  8. #8
    Registered User
    Join Date
    01-09-2016
    Location
    U.S
    MS-Off Ver
    10
    Posts
    5

    Re: Counting conditionally formatted font color not pre-formatted font color

    Jete,

    The code works, but I was wondering about tweaking it a bit,

    I re-attached the file, is it possible to have o7 count the range of d7:m7 by font color that
    was conditionally formatted?

    If I change the font color to white manually, it counts it just fine, but when the color is set by
    conditionally format, it doesn't count.

    if you type the number 2 in d7, you'll notice that font color changes to white in other cells that contain the number 2 also, and I need those font color changes to be counted in the "Font color count" column
    Thanks
    Attached Files Attached Files

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Counting conditionally formatted font color not pre-formatted font color

    Here is a URL that will count by font colour, cell colour and many other functions. The add-in gives you functions that you enter just like ordinary functions in Excel but have added functionality due to the VBA.
    http://www.asap-utilities.com/blog/i...n-their-color/
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. need a macro to convert conditionally formatted cells color to excel colors.
    By efi007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2015, 06:39 AM
  2. [SOLVED] Capture Interior Color of Conditionally Formatted Cell on Selection Change
    By daffodil11 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-07-2015, 04:31 PM
  3. Replies: 6
    Last Post: 02-16-2013, 05:12 AM
  4. Replies: 2
    Last Post: 02-04-2013, 02:00 PM
  5. Replies: 2
    Last Post: 09-22-2010, 07:54 PM
  6. Extracting Font Color from a Conditionally Formatted Cell
    By rsromano in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-27-2010, 04:21 PM
  7. how can I conditionally change font color, or background color?
    By MOHA in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2006, 01:57 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