Results 1 to 1 of 1

Count Colored Cells that contain Specific initials

Threaded View

hadydea Count Colored Cells that... 02-14-2020, 09:57 AM
  1. #1
    Registered User
    Join Date
    07-12-2019
    Location
    Rock Hill, South Carolina
    MS-Off Ver
    Office 365
    Posts
    29

    Count Colored Cells that contain Specific initials

    Hi everyone.

    I am trying to figure out a formula that will help me count pink cells with initials in them.
    I already have the VBA for counting colors, and I know the formula for counting specific text, but I need to combine the two.

    For example, in the workbook, there are two sheets.

    The first sheet (Project Totals) has a table that is meant to count what's going on in the second sheet.

    In the L1 TM sheet, if cells in Columns G-P meet a certain criteria, I have a macro that turns the Cells in Column F pink. If the cells in Columns G-P don't meet the set criteria, the Macro turns them orange.
    Column F will contain the initials of the person who performed the test that provides the results in Columns G-P. So I need to count each person's initials separately.

    I tried this:
    Formula: copy to clipboard
    =IF(CountCellsByColor('L1 TM'!$F$24:$F$5000, B25), COUNTIF('L1 TM'!$F$24:$F$5000, "ABC"))

    but all that does is count the number of cells that contain the person's initials and not the cell color.

    Alternatively, I don't mind editing the code to just change each person's initials to a color specific to them, but I am not sure how to do that.
    This is the code I have.

    Dim i As Long, lr As Long
        lr = Range("F" & Rows.Count).End(xlUp).Row
        Application.ScreenUpdating = False
        For i = 3 To lr
            If Range("G" & i).Interior.Color = 5287936 Or Range("G" & i).Interior.Color = 65535 Then
                If Range("H" & i).Interior.Color = 5287936 Or Range("H" & i).Interior.Color = 65535 Then
                    If Range("I" & i).Interior.Color = 5287936 Or Range("I" & i).Interior.Color = 65535 Then
                        If Range("K" & i).Interior.Color = 5287936 Or Range("K" & i).Interior.Color = 65535 Then
                          If Range("M" & i).Interior.Color = 5287936 Or Range("M" & i).Interior.Color = 65535 Then
                        Range("F" & i).Interior.ColorIndex = 22
                    End If
                End If
            End If
        End If
    End If
        Next i
        Application.ScreenUpdating = True
    End Sub
    If anyone can help, I would greatly appreciate it!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count specific character in range if cell is not colored
    By jh51745 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-09-2016, 10:56 AM
  2. Count specific character in range if cell is not colored
    By jh51745 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2016, 01:21 PM
  3. how to count colored cells?
    By cat3appr in forum Excel General
    Replies: 7
    Last Post: 10-07-2015, 06:17 PM
  4. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  5. Count number of unique initials within cells
    By Keithflc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-24-2013, 08:56 AM
  6. Count colored cells?
    By mlk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-30-2007, 06:30 PM
  7. [SOLVED] Blocking specific cells-INITIALS cell
    By Triangle in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-29-2005, 06:05 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