+ Reply to Thread
Results 1 to 4 of 4

Count Formats

  1. #1
    Matt
    Guest

    Count Formats

    Can you use a count function to count the number of cells with a particular
    format, say a colour?

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning Matt

    There is no native function to do this. I have an add-in available to anyone who requests it that will count or sum the number of cells with fonts or backgrounds that are a particular colour, but it will not interrogate based on any other format (bold, underline, centred etc.

    HTH

    DominicB
    [email protected]

  3. #3
    Bob Phillips
    Guest

    Re: Count Formats

    See http://www.xldynamic.com/source/xld.ColourCounter.html

    --
    HTH

    Bob Phillips

    "Matt" <[email protected]> wrote in message
    news:[email protected]...
    > Can you use a count function to count the number of cells with a

    particular
    > format, say a colour?




  4. #4
    Jack Sons
    Guest

    Re: Count Formats

    Matt,

    During the years I gathered a lot of handy code. I once found these macro's.
    Just what you need.

    Jack Sons
    The Netherlands
    ----------------------------------------------------------------------------------------------------
    Sub SumColorCountYellow()
    Dim Yellow6 As Integer
    Dim Cell As Range

    For Each Cell In Range("DataY")
    If Cell.Interior.ColorIndex = 6 Then
    Yellow6 = Yellow6 + Cell.Value
    End If
    Next
    originalF = Range("F1").Value
    Range("F1").Value = "Yellow = " & Yellow6

    MsgBox " Yellow adds to " & Yellow6, _
    vbOKOnly, "CountColor"

    Range("F1").Value = originalF '""
    End Sub
    ---------------------------------------------------------------------------------------------
    Function BoldSum(rng)
    ' sommeert de vette cellen in de range
    Dim c
    For Each c In rng
    If c.Font.Bold Then
    BoldSum = BoldSum + c.Value
    End If
    Next

    End Function
    -------------------------------------------------------------------------------------------------

    "Matt" <[email protected]> schreef in bericht
    news:[email protected]...
    > Can you use a count function to count the number of cells with a
    > particular
    > format, say a colour?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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