J
John
I had this neat macro that counts how many cells are a certain color:
Public Function CountColors(color As String) As Integer
Dim intCount As Integer
Dim cell As Range
For Each cell In Range("ThisRange").Cells
If cell.Interior.color = 825735 Then intCount = intCount + 1
Next cell
CountColors = intCount
End Function
The problem is, I have merged some cells. How can I get a macro to count
say, 3 cells merged into 1 as three cells, not 1, if they match a certain
color?.
Public Function CountColors(color As String) As Integer
Dim intCount As Integer
Dim cell As Range
For Each cell In Range("ThisRange").Cells
If cell.Interior.color = 825735 Then intCount = intCount + 1
Next cell
CountColors = intCount
End Function
The problem is, I have merged some cells. How can I get a macro to count
say, 3 cells merged into 1 as three cells, not 1, if they match a certain
color?.