PC Review


Reply
Thread Tools Rate Thread

Count Function on True Statements

 
 
krayziez
Guest
Posts: n/a
 
      29th May 2006

I wonder if I can do a count on a specific value, like if I had this:

CAR1
CAR1
CAR2
CAR2
CAR2
CAR3

Is there a way I can count how many "car2" I have? Currently, the only
way I can do this is to set a true/false statement then count the
trues.


--
krayziez
------------------------------------------------------------------------
krayziez's Profile: http://www.excelforum.com/member.php...o&userid=34891
View this thread: http://www.excelforum.com/showthread...hreadid=546334

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      29th May 2006
=countif(a1:a10,"car2")

This is a function that accepts wildcards, so if you wanted to count any old
car:

=countif(a1:a10,"car*")
(starts with car)

or

=countif(a1:a10,"*car*")
(contains car)

krayziez wrote:
>
> I wonder if I can do a count on a specific value, like if I had this:
>
> CAR1
> CAR1
> CAR2
> CAR2
> CAR2
> CAR3
>
> Is there a way I can count how many "car2" I have? Currently, the only
> way I can do this is to set a true/false statement then count the
> trues.
>
> --
> krayziez
> ------------------------------------------------------------------------
> krayziez's Profile: http://www.excelforum.com/member.php...o&userid=34891
> View this thread: http://www.excelforum.com/showthread...hreadid=546334


--

Dave Peterson
 
Reply With Quote
 
C01d
Guest
Posts: n/a
 
      29th May 2006

=COUNTIF(A1:A6,"=Car2")

This will result in the number of "Car2" instances found in the range
A1 to A6.


--
C01d
------------------------------------------------------------------------
C01d's Profile: http://www.excelforum.com/member.php...o&userid=34422
View this thread: http://www.excelforum.com/showthread...hreadid=546334

 
Reply With Quote
 
krayziez
Guest
Posts: n/a
 
      29th May 2006

Thanks. Actually I wanted to be more specific. If I had 2 sheets and one
was:
car1
car1
car2
car2
car2
car3

and then another column had:
car1
car2
car3

then I wanted to know how I can count using the 2nd column as the
value... I'm thinking it's this:
=COUNTIF(A1:A6,B1)


--
krayziez
------------------------------------------------------------------------
krayziez's Profile: http://www.excelforum.com/member.php...o&userid=34891
View this thread: http://www.excelforum.com/showthread...hreadid=546334

 
Reply With Quote
 
Joseph R. Pottschmidt
Guest
Posts: n/a
 
      29th May 2006
Dear Krayziez:

All you have to do is group your COUNTIF statements together by either
Adding them or subtracting them from one list against other.

Example
=CountIf(Sheet1!A1:A6,"Car2")+CountIf(Sheet2!A1:A3,"Car2")

Joe P.


-----Original Message-----
From: krayziez
[private.php?do=newpm&u=]
Posted At: Sunday, May 28, 2006 6:34 PM
Posted To: microsoft.public.excel
Conversation: Count Function on True Statements
Subject: Re: Count Function on True Statements


Thanks. Actually I wanted to be more specific. If I had 2 sheets and one
was:
car1
car1
car2
car2
car2
car3

and then another column had:
car1
car2
car3

then I wanted to know how I can count using the 2nd column as the
value... I'm thinking it's this:
=COUNTIF(A1:A6,B1)


--
krayziez
------------------------------------------------------------------------
krayziez's Profile:
http://www.excelforum.com/member.php...o&userid=34891
View this thread:
http://www.excelforum.com/showthread...hreadid=546334

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      29th May 2006
Use

=COUNTIF($A$1:$A$6,B1)

or if on separate sheets

=COUNTIF(Sheet1!$A$1:$A$6,B1)

and copy down

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"krayziez" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>
> Thanks. Actually I wanted to be more specific. If I had 2 sheets and one
> was:
> car1
> car1
> car2
> car2
> car2
> car3
>
> and then another column had:
> car1
> car2
> car3
>
> then I wanted to know how I can count using the 2nd column as the
> value... I'm thinking it's this:
> =COUNTIF(A1:A6,B1)
>
>
> --
> krayziez
> ------------------------------------------------------------------------
> krayziez's Profile:

http://www.excelforum.com/member.php...o&userid=34891
> View this thread: http://www.excelforum.com/showthread...hreadid=546334
>



 
Reply With Quote
 
krayziez
Guest
Posts: n/a
 
      29th May 2006

Great info. Thanks alot! This forum is my new home!


--
krayziez
------------------------------------------------------------------------
krayziez's Profile: http://www.excelforum.com/member.php...o&userid=34891
View this thread: http://www.excelforum.com/showthread...hreadid=546334

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are These Statements True? Barry Windows Vista Installation 1 29th Jan 2007 10:59 PM
Function to return True/False if all are validated as True by ISNU =?Utf-8?B?VGV0c3V5YSBPZ3VtYQ==?= Microsoft Excel Worksheet Functions 2 15th Mar 2006 10:28 AM
count if function with if statements =?Utf-8?B?TmF0YWxpYQ==?= Microsoft Excel Worksheet Functions 3 22nd Apr 2005 02:52 AM
True False statements katherine Microsoft Excel Programming 1 3rd Sep 2004 08:26 PM
True/False Statements newgram Microsoft Excel Misc 2 8th Apr 2004 03:37 PM


Features
 

Advertising
 

Newsgroups
 


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