If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
macrio soft exel
sir i want to find that ,in the row of an exel sheet if i hilighted one or
more one cell then i want to count that cell how?i can found ? |
#2
|
|||
|
|||
macrio soft exel
There is no built-in excel function to do this. But you can use a UDF that
looks at the range and returns the sum of color. But that function will not recalculate if you change color. Every time you change the color you will need to recalculate or wait excel to recalculate... To install the UDF (User Defined function). From workbook launch VBE using Alt+F11. From menu Insert a Module and paste the below function.Close and get back to workbook and try the below formula. Function COLORCOUNT(varRange As Range, varColor As Range) Dim cell As Range For Each cell In varRange If cell.Interior.ColorIndex = varColor.Interior.ColorIndex Then ColorCount = ColorCount + 1 End If Next End Function To use the as a formula in range A1:J1 try the below; which will count the number of cells colored same as cell A2....The second argument denotes the colored cell. =COLORCOUNT(A1:J1,A2) -- Jacob (MVP - Excel) "dheeraj sharma" wrote: sir i want to find that ,in the row of an exel sheet if i hilighted one or more one cell then i want to count that cell how?i can found ? |
#3
|
|||
|
|||
macrio soft exel
Hi,
If you are using MS Excel 2007, you may filter based on colour and then use =subtotal(109,range) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "dheeraj sharma" dheeraj wrote in message ... sir i want to find that ,in the row of an exel sheet if i hilighted one or more one cell then i want to count that cell how?i can found ? |
Thread Tools | |
Display Modes | |
|
|