ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count yellow-highlited rows (https://www.excelbanter.com/excel-discussion-misc-queries/250613-count-yellow-highlited-rows.html)

Vic

Count yellow-highlited rows
 
What is the formula to count how many lines are highlited in yellow?
Thank you.

מיכאל (מיקי) אבידן

Count yellow-highlited rows
 
As Luke said - there are several ways.
1) UDF:
Function CountIntColor(MyColor As Range, MySumRange As Range)
Application.Volatile
IntCol = MyColor.Interior.ColorIndex
For Each CL In MySumRange
If CL.Interior.ColorIndex = IntCol Then
Counter = Counter + 1
End If
Next
CountIntColor = Counter
End Function
===========
The first argument is the range of colored cells to be counted.
The second argument will refere to a single cell colored with YELLOW.
***************************************
2) Using the CELL function. Look it up in Excels Help
3) In Excel "2007"/"2010" - you can filter by Cell Interior color and count
the visible cells with SUBTOTAL function.
Micky


"Vic" wrote:

What is the formula to count how many lines are highlited in yellow?
Thank you.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com