# Conditional formatting using colors

Copper Contributor

# Conditional formatting using colors

I have a calendar that tracks my time worked, holiday, vacation, absent, sick pay and 1/2 day worked. I have been able to conditionally format cells in the calendar that will turn to a specified color when a particular code in entered. The codes are:

V= VACATION

SP= SICK PAY

A= ABSENT

W= WORKED

H= HOLIDAY

1/2V= 1/2 DAY VACATION

I would like to total the hour for each code in a separate column.

Everything is in the increments of 8 hrs. except for 1/2V which is 4hrs.

So for instance, I want to total all the cells that are blue knowing that each of those cells are equal to 8hrs. if cells R4:U4 are coded "W" then I want that total along with all the current cells that are coded "W" and the future inputs to be total in cell I12.

I want this for each color code.

Thank you for any help on this issue.

2 Replies

# Re: Conditional formatting using colors

For example for W (Worked):

=8*(COUNTIF(P4:BN20, "W")+COUNTIF(P36:BN50, "W"))

and for 1/2V:

=4*(COUNTIF(P4:BN20, "1/2V")+COUNTIF(P36:BN50, "1/2V"))

# Re: Conditional formatting using colors

@HansVogelaar Thanks so much. This worked out perfectly! I really appreciate your solution.