+ Reply to Thread
Results 1 to 3 of 3

Count coloured Cells

  1. #1
    Registered User
    Join Date
    08-24-2006
    Posts
    1

    Count coloured Cells

    Hi,

    Can anybody tell me how to count coloured cells in excel,

    For example, I have numbers with red and green colour, I just want to count

    how many Red coloured cells are there and how many green coloured cells are there?

    thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    Here is a great site to get a function to count colored cells


    http://www.cpearson.com/excel/colors.htm

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Count colored cells function and color index codes

    here's a code that will give you a list of the colours and their index numbers

    I first found this code at Andrew's Excel tips
    http://blog.livedoor.jp/andrewe/arch...at_103343.html
    hit Alt f11
    insert
    module
    copy this code into the module
    run the macro
    test it on a new workbook first so you see what it does first

    Sub ShowColorIndex()
    On Error Resume Next
    Workbooks.Add
    Do While ActiveCell.Row < 57
    With ActiveCell
    .Interior.ColorIndex = .Row
    .Offset(, 1) = .Row
    .Offset(1).Select
    End With
    Loop
    Cells(1, 1).Select
    End Sub

+ 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