View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default IF Statement based on Conditional format

On Fri, 23 Mar 2007 04:26:05 -0700, Hendrik wrote:

Hi all,

I have a sheet showing employee activities. It has a conditional format
based on the activity (i.e. "break" = yellow).

Now, I have a total collum counting all relevant activities (which are
displayed in numerical format). Because I dont want to include all
activities, I have to do a sum and select all relevant cells per employee.

I was wondering if I can do some sort of IF statement. i.e.:

when row 34 has a cell with a yellow fill conditional format, then SUM B2 +
all cells with the yellow conditional format.

or

when row 36 has a cell with a purple fill conditional format, then don't do
anything (or return 0)

I doubt if this is possible, but any suggestion are greatly appriciated.


Instead of looking at the fill color, when the fill is determined by
Conditional Formatting, construct your IF statement to look at the same
condition that is being used in the Conditional Format formula.

e.g. =IF(Activity = "Break", ...)


Or, if you have your Time in one column, and your Activity Type in another,
then:

=SUMIF(Activity, "Break", Time)


--ron