Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Make sure you put this in a standard Module (not a sheet o
ThisWorksheet). Code ------------------- Public Function countnonwhite(rInput As Range) as Single Dim nonwhite As Single nonwhite = 0 countnonwhite = 0 For Each c In ActiveSheet.Range(rInput) If c.Interior.ColorIndex < -4142 Then nonwhite = nonwhite + 1 Next countnonwhite = nonwhite End Su ------------------- Use it by entering =countnonwhite(A1:C100) -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Marking cells | Excel Discussion (Misc queries) | |||
Marking page end | Excel Worksheet Functions | |||
Excel 2007 Conditional Format: Marking Absences | Excel Discussion (Misc queries) | |||
coloured marking | New Users to Excel | |||
Water marking Excel | Excel Discussion (Misc queries) |