Counting cells depending upon a cell value.

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
 
R

Ron Coderre

Try this:
=SUMPRODUCT((A1:AE27="DG")*(A2:AE28="G"))

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

Regards,

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

rttaksali

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'.
 
B

Bob Phillips

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)
 
R

Ron Coderre

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)
 
R

rttaksali

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top