Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Sum Formula to Exclude Certain Cell Values/Backgrounds

Incell range W15:W31, percent values are font/background-color conditional
formatted.

In cell W10 is the following formula: =SUM(X15:X31)

What would the formula be to exclude in the sum, a cell having a green
background and a zero percent value?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Sum Formula to Exclude Certain Cell Values/Backgrounds

First, there's not worksheet formula that looks at the colors used in the cells.

You could write your own UserDefinedFunction that looks at colors. Finding the
colors that are applied via Format|cells is straightforward. But finding colors
based on the conditional formatting rules is not for the weak at heart.

Chip Pearson has some code for the format|cells stuff at:
http://www.cpearson.com/excel/colors.htm
look for: Summing The Values Of Cells With A Specific Color

and he has some hellacious code for just finding the conditional formatting
stuff at:
http://www.cpearson.com/excel/CFColors.htm

=====
But if the value is 0, no matter what the color, it shouldn't affect the =sum()
formula.

0 + prettymuchanything = prettymuchanything.







Phil Hageman wrote:

Incell range W15:W31, percent values are font/background-color conditional
formatted.

In cell W10 is the following formula: =SUM(X15:X31)

What would the formula be to exclude in the sum, a cell having a green
background and a zero percent value?


--

Dave Peterson

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
need this formula to exclude cell value 'x' and 'xx' when counting Mitchell_Collen via OfficeKB.com Excel Discussion (Misc queries) 2 July 10th 08 04:55 PM
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
charts exclude cell with formula linda Charts and Charting in Excel 0 September 19th 07 05:12 AM
funtions for colors for fonts or cell backgrounds? Yogi Smith Excel Worksheet Functions 5 July 12th 06 11:26 PM
Excel 2003 - SUM Formula - exclude cell Peppermint Excel Worksheet Functions 2 January 4th 06 04:53 PM


All times are GMT +1. The time now is 05:02 PM.

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"