# Conditional Formatting

#### Stclements1

##### Board Regular
Hello to you all and weekend wishes.

I am devising a Gantt Chart for flying school and ground school. in one row I have the number 18 in certain cells and this represents cadets in ground school in the row beneath I have cells that have 18 in and this determines cadets in flight school and then on the row beneath is a new class of graduates and they have two rows one for ground school and one for flight school.
My question is it possible in excel to conditional format so that when I total the coloum values at the bottom of the chart it only counts the value in the cells that are of a certain fill say brown for ground school and blue for flight school. If not is there a formula that will allow me to get the sum of a coloum counting only cadets in flight school and the sum of a coloum counting only cadets in ground school.

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

#### mole999

##### Moderator
what version of excel are you using, i think later versions can have the ability

#### Stclements1

##### Board Regular
what version of excel are you using, i think later versions can have the ability

2016

#### nigelandrewfoster

##### Well-known Member
I think I understand. Have you tried using COUNTIFS? A quick example:

 A TEAM GROUND 18 18 18 18 A TEAM FLIGHT 18 18 18 18 B TEAM GROUND 18 18 18 B TEAM FLIGHT 18 18 18 18 GROUND 1 1 1 0 1 2 0 1 FLIGHT 0 2 1 1 0 2 1 1

<colgroup><col><col span="8"></colgroup><tbody>
</tbody>

If that's what you're after, the fomula in the topmost column total in this example is: =COUNTIFS(B\$2:B\$5,18,\$A\$2:\$A\$5,"*GROUND"), the bottommost

Let me know if you need an explanation of the formulae!

#### Stclements1

##### Board Regular
That has worked absolutely perfect, many many thanks.

Replies
4
Views
85
Replies
0
Views
39
Replies
3
Views
51
Replies
1
Views
65
Replies
8
Views
81