Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

428
Visualizações
How to count color filled cells (regardless of text or blank) in excel?

I am trying to count the number of cells in a specific column that are filled with a specific color, as there can be multiple colors within one column. These cells can be empty or filled with text, and the excel guides I've found online aren't helping much as they can only count one or the other. I found a VBA guide which suggested this code:

Function ColorCount(ColorCell As Range, DataRange As Range)

   Dim Data_Range As Range
   Dim Cell_Color As Long

   Cell_Color = ColorCell.Interior.ColorIndex

   For Each Data_Range In DataRange

   If Data_Range.Interior.ColorIndex = Cell_Color Then
   ColorCount = ColorCount + 1
   End If

   Next Data_Range

End Function

However, when I input this code and ran the =ColorCount function, every cell with any type of color was counted. Is there something I am doing wrong here? The specific function syntax I was told to follow is =ColorCount("cell with specific color as example","range of cells to count").

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda