LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default function "count if color"

If the function reevaluates when you change a force a recalculation by changing
something not in your range, then you already have application.volatile in the
code.

But excel doesn't recalc when you change colors of fonts or fills.

Maybe an F9 (tools|option|calculation tab|Calculate now) will be sufficient.

This is from xl2002's help:

Calculate a worksheet or workbook now

Press F9 Calculates formulas that have changed since the last calculation, and
formulas dependent on them, in all open workbooks. If a workbook is set for
automatic calculation, you do not need to press F9 for calculation.

Press SHIFT+F9 Calculates formulas that have changed since the last
calculation, and formulas dependent on them, in the active worksheet.

Press CTRL+ALT+F9 Calculates all formulas in all open workbooks, regardless of
whether they have changed since last time or not.

Press CTRL+SHIFT+ALT+F9 Rechecks dependent formulas, and then calculates all
formulas in all open workbooks, regardless of whether they have changed since
last time or not.

(I think that the last one is new with xl2002.)



"José Ignacio Bella" wrote:

Hello, I have a function that counts (or sums) all the cells in a range that
have the same color than the sample cell
CountIfColor (Range,SampleCell)
I use a For-Next loop, and I compare the color of every cell with the color
of the sample cell.

The problem comes when I change the color of one of the cells of the range:
the function doesn't recalculates. If I change the value goes ok, but if I
change the color not.

I can't use Worksheet_Change because the function is located in an .xla
sheet, and the users do not know how to work with Vb.

Can someone give me an idea (maybe a different focus) to help me?

Thanks in advance


--

Dave Peterson

 
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
Incorporating Cell color fill in an "if" logical function? George_Sky Excel Worksheet Functions 46 April 4th 23 02:18 PM
How do I change the fill color of a cell using an "IF" function donschap Excel Worksheet Functions 6 March 9th 10 03:48 PM
Create Pivot Table Data with Column "Sum" rather than "count" defa Johnny_99[_2_] Excel Discussion (Misc queries) 2 January 2nd 10 03:25 PM
Can I create an "IF" function using cell color as a logical test? JessLynn Excel Worksheet Functions 1 June 25th 08 08:09 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"