Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

contar celdas por color

publicado

Buenas tardes foreros, he buscado información en la web para contar celdas según su color, pero la función "CONTARCOLOR" no me funciona, alguien sabe cómo puedo contar celdas con un color específico en  un rango dado??

Featured Replies

publicado

Yo hice una tarea así hace un tiempo.

Solo pega la función en un modulo

Function ContarColor(celdaColor As Range, rangoContar As Range) As Long
    Dim celda As Range
    Dim colorCelda As Long
    Dim contador As Long
    
    colorCelda = celdaColor.Interior.ColorIndex
    
    For Each celda In rangoContar
        If celda.Interior.ColorIndex = colorCelda Then
            contador = contador + 1
        End If
    Next celda
    
    ContarColor = contador
End Function

Por ejemplo, si la celda A1 tiene el color a contar y el rango a tomar en cuenta para contar las celdas que tengan el mismo color es el rango B1:B10, entonces la fórmula sería:

=ContarColor(A1,B1:B10)

Saludines.

publicado
  • Autor

excelente estimado @Israel Cassales!!!,  agradezco mucho tu pronta respuesta, es lo que necesito amigo, hasta pronto y muchas gracias. doy tema como solucionado.?

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.