Need to count occurances in different columns
Assuming the months in D1:M1
=SUMPRODUCT(--(OFFSET(D1,,MATCH(A1,D1:M1,0)-1,100,1)=B1))
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"More Macro Help Needed"
wrote in message ...
I have columns of data (each with a different column name at the top: Jan,
Feb, Mar, etc). The columns consist of three or more different words
(apple,
pear, orange, etc.) and zero values. I am looking for a formula that will
count the occurance of the words in each column based on two criteria:
Column
Name and Word. For example: If I set cell A1 to Jan and cell B1 to
Apple,
cell C1 returns all the times Apple appears in the Jan column. The number
of
columns is different from the number of rows in each column. Any help
with
this is greatly appreciated. Let me know if more information is needed.
Thanks.
Dan
|