#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default 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 ?


Reply
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 do I convert a non exel tabulation to exel dte123 New Users to Excel 2 June 30th 06 02:31 AM


All times are GMT +1. The time now is 11:23 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"