Counting paired data

  • Thread starter Thread starter Ken Schmidt
  • Start date Start date
K

Ken Schmidt

I have a set of data with columns alternating names and numbers. I would
like to return the number of times a specified name and number is paired up.
For example, how many times is "Jones" in the data range with "30" in the
cell to the right. I have tried OFFSET, COUNTIF, and SUMPRODUCT formulas,
but have been unable to get the results I want. Any help would be
appreciated. An array formula would be fine. Using Excel 97.

Ken Schmidt
 
Hi Ken
Provided names are in column A and numbers in column B, formula:
=SUMPRODUCT((A1:A50="Jones")*(B1:B50=30))

NB: This is NOT an array formula

HTH
Cordially
Pascal
 
Thanks for the reply. I should have made clearer that I have several
columns of data like this; column C is names, column D numbers, column E
names again, etc. I need to know whenever "Jones" appears in any names
column, how many times "30" is in the cell to the right. I thought maybe I
could use OFFSET to shift the search over a column, but can't get that to
work.

Ken
 
It really doesn't matter how many columns you have, as long as they follow
the same pattern of names and numbers.

Try this for a 10 column data list:

=SUMPRODUCT((A1:I100="Jones")*(B1:J100=30))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Thanks for the reply. I should have made clearer that I have several
columns of data like this; column C is names, column D numbers, column E
names again, etc. I need to know whenever "Jones" appears in any names
column, how many times "30" is in the cell to the right. I thought maybe I
could use OFFSET to shift the search over a column, but can't get that to
work.

Ken
 
I just tried to use that, and it's not working.

=SUMPROD((D2:D12107="CompanyXYZ")*(F2:F12107="CompanyXYZ")*(H2:H12107="Service")*(Q2:Q12107))

I get #N/A. I tried putting "CompanyXYZ" into Cell A12111 an
"Service" into Cell B12111, and neither of these worked, either.

=SUMPROD((D2:D12107=$A$12111)*(F2:F12107=$A$12111)*(H2:H12107=$B$12111)*(Q2:Q12107))
=SUMPROD((D2:D12107=A12111)*(F2:F12107=A12111)*(H2:H12107=B12111)*(Q2:Q12107)
 

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

Similar Threads


Back
Top