countif

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,
i am trying to write following formula, but.............

sheet 1 Sheet 2
A_col B_col A_col B_col C_col
japan 10 japan 10 formula would be here
(C1)
korea 40 london 35
japan 10 tokyo 22

=countif('sheet 1'!a1:a20='sheet2'!=a1)*('sheet 1'!b1:b20='sheet 2'!b1))

but this formula doesn't work, acctully i want count like Japan = 10 from
sheet-1 into sheet-2.
Thanks in advance.
 
Hi,

Try...

=SUMPRODUCT((Sheet1!$A$1:$A$20=Sheet2!A1)*(Sheet1!$B$1:$B$20=Sheet2!B1)*(Sheet1!$A$1:$A$20<>""))

Or, if you're not worried about blank cells being tested for, then
just...

=SUMPRODUCT((Sheet1!$A$1:$A$20=Sheet2!A1)*(Sheet1!$B$1:$B$20=Sheet2!B1))

would do.

Ken Johnson
 

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

Back
Top