Results 1 to 8 of 8

Counting cells with colour fill, minus the cells with text

Threaded View

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    Tønsberg, Norway
    MS-Off Ver
    365
    Posts
    10

    Question Counting cells with colour fill, minus the cells with text

    Hi,

    Ratehr new at this.
    Have made a macro with the a function to count cells with different fill colours. the thing I need is to disregard the cells with the given colour that have text fill. Is that possible? Macro and Function below.

    MACRO;

    Function Countcolour(rng As Range, colour As Range) As Long
    Dim c As Range
    Application.Volatile
    For Each c In rng
        If c.Interior.ColorIndex = colour.Interior.ColorIndex Then
            Countcolour = Countcolour + 1
        End If
    Next
    End Function


    FUNCTION;

    =(Countcolour($A$1:$AL$88;$B$43))-1

    Any input would be valuable.

    Thanks!
    Last edited by arlu1201; 04-29-2013 at 05:39 AM.

Thread Information

Users Browsing this Thread

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

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