macros excel contar celdas de color
DESCRIPTION
macros excelTRANSCRIPT
![Page 1: Macros Excel Contar Celdas de COLOR](https://reader036.vdocuments.us/reader036/viewer/2022081721/5695cf521a28ab9b028d9104/html5/thumbnails/1.jpg)
7/21/2019 Macros Excel Contar Celdas de COLOR
http://slidepdf.com/reader/full/macros-excel-contar-celdas-de-color 1/1
Function COLOR_COND(celda As Range) As Long
Dim ReglaActiva As Boolean
For i = 1 To celdaFormatConditionsCount
!it" celdaFormatConditions(i) #$ T%&e = 'lCellalue T"en
elect Case O&erator
Case 'lBet*een+ ReglaActiva = celdaalue ,=
-valuate(Formula1) _ And celdaalue .= -valuate(Formula/)
Case 'lNotBet*een+ ReglaActiva = celdaalue .=-valuate(Formula1) _
Or celdaalue ,= -valuate(Formula/)
Case 'l-0ual+ ReglaActiva = -valuate(Formula1) =
celdaalue Case 'lNot-0ual+ ReglaActiva = -valuate(Formula1) .,
celdaalue Case 'lreater+ ReglaActiva = celdaalue ,
-valuate(Formula1) Case 'lLess+ ReglaActiva = celdaalue .
-valuate(Formula1) Case 'lreater-0ual+ ReglaActiva = celdaalue ,=
-valuate(Formula1) Case 'lLess-0ual+ ReglaActiva = celdaalue .=
-valuate(Formula1) -nd elect
-lse#$ T%&e = 'l-'&ression T"en A&&licationcreen2&dating = False
celdaelect
ReglaActiva = -valuate(Formula1)
Range(ActiveCellAddress)elect A&&licationcreen2&dating = True
-nd #$ #$ ReglaActiva T"en
COLOR_COND = #nteriorcolor
-'it Function
-nd #$ -nd !it"
Ne't i-nd Function
Function CONT_COL_COND(CeldaColor As Range3 Rango As Range) As #nteger
Dim celda As Range
Dim resultado As #nteger
Dim color As Long
color = COLOR_COND(CeldaColor)
For -ac" celda #n RangoCells #$ COLOR_COND(celda) = color T"en
resultado = resultado 4 1 -nd #$
Ne't celda CONT_COL_COND = resultado
-nd Function