LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Count merged cells as if unmerged

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?.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to count merged cells Excel Ella Excel Worksheet Functions 2 April 9th 10 10:28 PM
Count merged cells jlclyde Excel Discussion (Misc queries) 1 October 8th 09 01:08 PM
Count with merged cells Excelerator Excel Discussion (Misc queries) 2 July 23rd 09 03:50 AM
Creating Serial Additions of Numbers Formatted "M-N" In Merged and Unmerged Cells Patient Guy Excel Worksheet Functions 2 May 29th 09 02:56 PM
Retain value of merged cell in all unmerged cells kari Excel Discussion (Misc queries) 3 July 15th 08 12:36 AM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"