+ Reply to Thread
Results 1 to 5 of 5

Count four colours

  1. #1
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Arrow Count four colours

    Hello all ,

    I am wanting to get a function or macro that can count the four different colours
    in this sheet .

    But only count when the heading has the letter P in it from col F onwards . .

    Thanks .
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Count four colours

    How is that color being applied?

    If it was through Conditional Formatting, we may be able to use the same rule
    If it was manually colored, formulas cannot see color, so you will need VBA
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Count four colours

    Thanks for that , i have put the macro in this book2 .

    Its used for my very large 450,000 row main sheet .
    thanks .
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Count four colours

    Here is a VBA solution

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Count four colours

    Thanks Alan , initially i thought there was a problem where i had the four colours listed in my order of cols.
    But the macro works perfectly with green and lite blue swapped around in your macro . I will work on getting brown , green , lite blue , dark blue in order a little later .
    Over all really happy , thanks so much .

+ 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. How do I count how many times two colours appear together?
    By mthomas66 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2014, 05:34 PM
  2. Replies: 1
    Last Post: 05-08-2013, 08:49 AM
  3. Is there a formular in Excel that can count the colours of a cell?
    By petedacreep in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-06-2012, 05:46 AM
  4. userform to count cell colours and display in textboxes
    By AGrace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2011, 09:39 AM
  5. Replies: 25
    Last Post: 03-29-2010, 03:23 PM
  6. Count Cell Colours
    By Stevesmith in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2007, 08:46 AM
  7. Count If on colours in a cell?
    By Jelinek in forum Excel General
    Replies: 2
    Last Post: 05-11-2006, 06:40 AM

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