AVERAGE (But only IF)
I have 4 named Columns, for simplicity they a Code, Red, Blue and Green.
In the Code Column are the numbers 1,2, or 3 and are random. The Red, Blue
and Green Columns contain numbers anywhere between 1 and 100. But, not all
the rows in the coloured columns contain numbers. I am trying to find the
Average of each of the coloured Columns but only where I specific a code. I
started with the following,
=SUMIF(Code,1,Red)/COUNTIF(Code,1)
but found that the sum was being divided by the total of the Code 1's and
not the number of cells that contain data. Unfortunately, I have tried all
sorts of other combinations but with my level of knowledge, have got no
further. I would be grateful for some guidance.
--
Glenn
|