A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macrio soft exel



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 08:53 PM posted to microsoft.public.excel.worksheet.functions
dheeraj sharma
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  
Old May 27th, 2010, 09:21 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
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  
Old May 29th, 2010, 03:11 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
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 ?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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