View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Whois Clinton Whois Clinton is offline
external usenet poster
 
Posts: 38
Default Counting Merged Cells

I am using 2003 and counting colored blank cells. The range is several rows
with some rows containing 4 column cells (ie A1, B1, C1, D1) and other rows
with only 2 column cells having merged A1 and B1 into one cell with C1 and D1
into a second merged cell.
I need the merged cells to only count as one. Currently they count as 2
when I run the following:

Sub standard()
Set myrange = Range("A1:D20")
For Each c In myrange
If c.Interior.ColorIndex = 6 Then
yellowcells = yellowcells + 1
End If
Next
MsgBox yellowcells
End Sub


I am not an expert macro writer so I hope this makes sense :J
Thanks in advance for any help.

Clint