#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default countif

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.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default countif

Hi

Try
=SUMPRODUCT((Sheet1!$A$2:$A$20=$A2)*(Sheet1!$B$2:$ B$20=$B2))

--
Regards

Roger Govier


"Tufail" wrote in message
...
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.





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default countif

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumproduct vs. countif Coal Miner Excel Discussion (Misc queries) 1 June 15th 06 09:34 PM
Countif Formula /Sort Bug??? orcfodder Excel Discussion (Misc queries) 2 January 12th 06 10:04 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


All times are GMT +1. The time now is 06:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"