#1   Report Post  
johanl
 
Posts: n/a
Default Counting words


I have two columns.

The first one with four diffrent words (cat, dog, rabbit, fish, horse
and bird), and the second column have nine different names.

The worsheet works so that the first column shows what pet the owner
(In the second column) has . It´s a pretty long list...

I want to make a function that only counts when the first column says
"cat" and the second says"Pet Owner 1".

Hope someone understand what I´m rambling about... :)


--
johanl
------------------------------------------------------------------------
johanl's Profile: http://www.excelforum.com/member.php...o&userid=25740
View this thread: http://www.excelforum.com/showthread...hreadid=391512

  #2   Report Post  
Max
 
Posts: n/a
Default

Assume source data is in cols A and B, in A2:B100

Assume C1 & D1 will be reserved for input of the pet and the owner's name
e.g.: in C1: cat, in D1: Pet Owner 1

Put in say, C2:
=IF(OR(C1="",D1=""),"",SUMPRODUCT((A2:A100=C1)*(B2 :B100=D1)))

C2 will return the desired count result for the inputs in C1 and D1

Adapt the ranges in cols A and B to suit, but note that we can't use entire
col references in SUMPRODUCT
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"johanl" wrote in
message ...

I have two columns.

The first one with four diffrent words (cat, dog, rabbit, fish, horse
and bird), and the second column have nine different names.

The worsheet works so that the first column shows what pet the owner
(In the second column) has . It´s a pretty long list...

I want to make a function that only counts when the first column says
"cat" and the second says"Pet Owner 1".

Hope someone understand what I´m rambling about... :)


--
johanl
------------------------------------------------------------------------
johanl's Profile:

http://www.excelforum.com/member.php...o&userid=25740
View this thread: http://www.excelforum.com/showthread...hreadid=391512



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
counting specific words jen Excel Worksheet Functions 2 June 25th 05 12:46 AM
triadic combinations of words jayock02 Excel Worksheet Functions 1 June 19th 05 02:10 AM
Spell Checking - Special Words Not Picked Up by Excel Hans Emilio Excel Discussion (Misc queries) 4 May 25th 05 02:25 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM
counting instances of words in a worksheet cell CJ Excel Discussion (Misc queries) 2 December 22nd 04 02:49 AM


All times are GMT +1. The time now is 06:59 AM.

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"