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.
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.
=COUNTIF(A1:A6,"=Car2")
This will result in the number of "Car2" instances found in the range A1 to A6.
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)
=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
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
[mailto:[email protected]]
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
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" <[email protected]> wrote in
message news:[email protected]...
>
> 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
>
Great info. Thanks alot! This forum is my new home!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks