Counting cells depending upon a cell value.

  • Thread starter Thread starter rttaksali
  • Start date Start date
R

rttaksali

Hi there,

I've a table with the cell range a1:AE28.
For the odd no. rows of the table, starting with the first row the
possible values are "DG", "YL", "DR" and "DB".
For the even no. rows of the table, starting with the second row the
possible values are "G", "R" and "B".
I need a formulae to calculate the count of cells having a value as
"DG", for all the cells having values as "G".

Thanks for your help....

Rashi

p.s. here is a sample of the table, to give an idea
First row--- DB DG DG DG DG YL DB
Second row-- R R R G G G G
 
Try this:
=SUMPRODUCT((A1:AE27="DG")*(A2:AE28="G"))

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
Try this:
=SUMPRODUCT((A1:AE27="DG")*(A2:AE28="G"))

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)








- Show quoted text -

Thanks, but I'm afraid to say that this not what I am after. In the
sample data I posted, for cells having the 'G' the no. of counts cells
is 2 having value as 'DG'.
 
This gives me 2

=SUMPRODUCT(--(A1:AE1="DG"),--(A2:AE2="G"))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Regarding:
=SUMPRODUCT((A1:AE27="DG")*(A2:AE28="G"))

When I use that formula against your sample data the returned value is: 2.

You don't say what value it returns for you.
Did you copy it correctly?

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
Regarding:
=SUMPRODUCT((A1:AE27="DG")*(A2:AE28="G"))

When I use that formula against your sample data the returned value is: 2.

You don't say what value it returns for you.
Did you copy it correctly?

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)







- Show quoted text -

Thanks, again and it is working now....
 
Back
Top