+ Reply to Thread
Results 1 to 2 of 2

Need VBA code to count cells with conditional formatting

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    Des Moines, Iowa
    MS-Off Ver
    2007
    Posts
    1

    Need VBA code to count cells with conditional formatting

    I am needing a way to, formula or macro, to count the number of cells in a row that are conditionally formatted. I am novice with VBA and from my searching it looks like all solutions are based on VBA. I've been trying to get them to work with my data but haven't had any luck. So I'm hoping a specific thread with an example of my data might yield a more specific code. Below is an example of what I'm working with:

    Column A Column B-P
    Locations Values

    Each column B-P is conditionally formatted so the top or bottom 5 values have Light Red Fill and Dark Red Text. I am wanting to have another column, R, that shows how many cells are conditionally formatted in each Location row. For example, Location 1 (row 2) might have 3 cells in it's row that are in the top 5, thus conditionally formatted to Light Red Fill and Dark Red Text. I am looking for a way to have cell R2 look in B2:P2 and return the number of cells that are conditionally formatted, 3.

    Any help would be greatly appreciated. Please let me know if this is not clear enough. Thanks!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Need VBA code to count cells with conditional formatting

    VBA cannot help you find conditionally formatted cells.

    It can however given your formatting formula find the cells that would be conditionally formatted.

+ 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] Count cells based on Conditional formatting
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2014, 03:41 PM
  2. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  3. Count Cells colored by conditional formatting
    By sam99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2013, 02:58 PM
  4. Count Coloured cells (conditional formatting)
    By MaddieRoberts in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2012, 08:46 AM
  5. Code For Count on Conditional formatting
    By Aaron in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2006, 02:30 PM

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