ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Calculation (https://www.excelbanter.com/excel-worksheet-functions/33920-conditional-calculation.html)

bhofsetz

Conditional Calculation
 

Is there a way to have a worksheet function perform a calculation based
on the font color or interior color of a cell?

Basically I'd like to have the function calculate the average of a
range of cells and then be able to change the font color of certian
entries in the range so that those would be excluded from the average
calculation.

Thanks for any suggestions.


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=384693


Gilles Desjardins

Hi bhofsetz, Chip Pearson has this on his site, perhaps you can modify for
an average?

http://cpearson.com/excel/colors.htm

Hope this helps

Gilles

"bhofsetz" wrote in
message ...

Is there a way to have a worksheet function perform a calculation based
on the font color or interior color of a cell?

Basically I'd like to have the function calculate the average of a
range of cells and then be able to change the font color of certian
entries in the range so that those would be excluded from the average
calculation.

Thanks for any suggestions.


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile:
http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=384693




Gord Dibben

Only through the use of a VBA user defined function.

Excel can't do this on its own.

See Chip Pearson's site for code on summing, counting etc.

http://www.cpearson.com/excel/colors.htm


Gord Dibben Excel MVP


On Tue, 5 Jul 2005 16:49:43 -0500, bhofsetz
wrote:


Is there a way to have a worksheet function perform a calculation based
on the font color or interior color of a cell?

Basically I'd like to have the function calculate the average of a
range of cells and then be able to change the font color of certian
entries in the range so that those would be excluded from the average
calculation.

Thanks for any suggestions.



bhofsetz


Gilles and Gord,
Thanks for the information. I figured that I would end up having
to use VBA but was hoping there might be a worksheet function that
could handle this.

I think I can modify the sumifbycolor to accomplish what I'm after and
just have a button the user can click to recalcuate the sheet after
they have changed any colors.

Thanks again


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=384693



All times are GMT +1. The time now is 05:29 AM.

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