#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Count If value

Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count If value

If column B *always* has a value of 1 then all you need to do is count the
instances in column A:

=COUNTIF(A:A,"Dem")
=COUNTIF(A:A,"Fre")

=COUNTIF(A2:A100,"Dem")
=COUNTIF(A2:A100,"Fre")

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Count If value

hi
countif....
=countif(A1:A20,"Dem")
results = 3
column B has no relevence.

what problems are you haveing?

Regards
FSt1

"Kennedy" wrote:

Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Count If value

hi
afterthought..
column B would have relevence if you were using SumIf.

which are we talking about??

regards
FSt1

"FSt1" wrote:

hi
countif....
=countif(A1:A20,"Dem")
results = 3
column B has no relevence.

what problems are you haveing?

Regards
FSt1

"Kennedy" wrote:

Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Count If value

Thanks for the replies....
Column B will have relevance in the formula. Specifically, I am counting the
actual number returned. While I onlyu put 1 in column B, the return value
could be 2, 3, 4, etc....
So what I would like to do is say, count all the numbers in column B for the
Dems in column A and ive me a total, then count all the numbers in column B
for Fre and give me a total.

"FSt1" wrote:

hi
afterthought..
column B would have relevence if you were using SumIf.

which are we talking about??

regards
FSt1

"FSt1" wrote:

hi
countif....
=countif(A1:A20,"Dem")
results = 3
column B has no relevence.

what problems are you haveing?

Regards
FSt1

"Kennedy" wrote:

Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Count If value

You want a Pivot Table. It will do everything you want simply and quickly.

Regards,
Fred

"Kennedy" wrote in message
...
Thanks for the replies....
Column B will have relevance in the formula. Specifically, I am counting
the
actual number returned. While I onlyu put 1 in column B, the return value
could be 2, 3, 4, etc....
So what I would like to do is say, count all the numbers in column B for
the
Dems in column A and ive me a total, then count all the numbers in column
B
for Fre and give me a total.

"FSt1" wrote:

hi
afterthought..
column B would have relevence if you were using SumIf.

which are we talking about??

regards
FSt1

"FSt1" wrote:

hi
countif....
=countif(A1:A20,"Dem")
results = 3
column B has no relevence.

what problems are you haveing?

Regards
FSt1

"Kennedy" wrote:

Trying to find a way to use a countif value that pulls back specific
count
for certain values in a column. Using countif because the cell
contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Count If value

hi
count numbers in B or sum numbers in B? i may still be confused here.
counting instances of Dem in A would be the same counting a number in B that
matches up to Dem in A and B would still have no relevence.
unless you had a situation where you didn't want to count certain numbers
like zeros. use sumproduct then
=SUMPRODUCT((A1:A20="Dem")*(B1:B20<0))

if your are counting, B should have no relevence.

regards
FSt1



"Kennedy" wrote:

Thanks for the replies....
Column B will have relevance in the formula. Specifically, I am counting the
actual number returned. While I onlyu put 1 in column B, the return value
could be 2, 3, 4, etc....
So what I would like to do is say, count all the numbers in column B for the
Dems in column A and ive me a total, then count all the numbers in column B
for Fre and give me a total.

"FSt1" wrote:

hi
afterthought..
column B would have relevence if you were using SumIf.

which are we talking about??

regards
FSt1

"FSt1" wrote:

hi
countif....
=countif(A1:A20,"Dem")
results = 3
column B has no relevence.

what problems are you haveing?

Regards
FSt1

"Kennedy" wrote:

Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Count If value

Hi Valko,
Here's a better sample of what I am trying to do:
If you look at the sample below, you will see that I am looking at both the
Net and Area to gather the number. So if the Area has Dem, count all the
numbers under the Net. If the Area has Fre, count all the numbers under the
Net associated with Fre. There are several other items in the Area that I did
not list here and unfortunately it varies from day to day with the number of
values.

Value Month NET Rpt Cnt Count Area Case
1 1 Dem
Elim Feb 0 1 Dem
1 1 Dem
2 1 Dem
Add March 1 1 Fre
3 1 Fre
2 1 Fre
Elim March 0 1 Fre
Elim Feb 0 1 Fre
Elim Feb 0 1 Fre

4 Dem
6 Fre


"T. Valko" wrote:

If column B *always* has a value of 1 then all you need to do is count the
instances in column A:

=COUNTIF(A:A,"Dem")
=COUNTIF(A:A,"Fre")

=COUNTIF(A2:A100,"Dem")
=COUNTIF(A2:A100,"Fre")

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Trying to find a way to use a countif value that pulls back specific count
for certain values in a column. Using countif because the cell contains a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count If value

Try something like this...

=SUMPRODUCT(--(A2:A100="Dem"),--(ISNUMBER(B2:B100)))

Adjust the ranges to suit.

Note that with SUMPRODUCT you *can't* use entire columns as range references
unless you're using Excel 2007.

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Hi Valko,
Here's a better sample of what I am trying to do:
If you look at the sample below, you will see that I am looking at both
the
Net and Area to gather the number. So if the Area has Dem, count all the
numbers under the Net. If the Area has Fre, count all the numbers under
the
Net associated with Fre. There are several other items in the Area that I
did
not list here and unfortunately it varies from day to day with the number
of
values.

Value Month NET Rpt Cnt Count Area Case
1 1 Dem
Elim Feb 0 1 Dem
1 1 Dem
2 1 Dem
Add March 1 1 Fre
3 1 Fre
2 1 Fre
Elim March 0 1 Fre
Elim Feb 0 1 Fre
Elim Feb 0 1 Fre

4 Dem
6 Fre


"T. Valko" wrote:

If column B *always* has a value of 1 then all you need to do is count
the
instances in column A:

=COUNTIF(A:A,"Dem")
=COUNTIF(A:A,"Fre")

=COUNTIF(A2:A100,"Dem")
=COUNTIF(A2:A100,"Fre")

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Trying to find a way to use a countif value that pulls back specific
count
for certain values in a column. Using countif because the cell contains
a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Count If value

Thanks again,
This worked. The solution by FSt1 also worked for the formula. Just changed
the columns to have it look at the numbers first, then the "Dem" values. But
the concept was perfect. Thanks to both of you again, and I have clicked on
the "Yes" button to show that the answers you two provided worked.

"T. Valko" wrote:

Try something like this...

=SUMPRODUCT(--(A2:A100="Dem"),--(ISNUMBER(B2:B100)))

Adjust the ranges to suit.

Note that with SUMPRODUCT you *can't* use entire columns as range references
unless you're using Excel 2007.

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Hi Valko,
Here's a better sample of what I am trying to do:
If you look at the sample below, you will see that I am looking at both
the
Net and Area to gather the number. So if the Area has Dem, count all the
numbers under the Net. If the Area has Fre, count all the numbers under
the
Net associated with Fre. There are several other items in the Area that I
did
not list here and unfortunately it varies from day to day with the number
of
values.

Value Month NET Rpt Cnt Count Area Case
1 1 Dem
Elim Feb 0 1 Dem
1 1 Dem
2 1 Dem
Add March 1 1 Fre
3 1 Fre
2 1 Fre
Elim March 0 1 Fre
Elim Feb 0 1 Fre
Elim Feb 0 1 Fre

4 Dem
6 Fre


"T. Valko" wrote:

If column B *always* has a value of 1 then all you need to do is count
the
instances in column A:

=COUNTIF(A:A,"Dem")
=COUNTIF(A:A,"Fre")

=COUNTIF(A2:A100,"Dem")
=COUNTIF(A2:A100,"Fre")

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Trying to find a way to use a countif value that pulls back specific
count
for certain values in a column. Using countif because the cell contains
a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



.



.



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count If value

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Thanks again,
This worked. The solution by FSt1 also worked for the formula. Just
changed
the columns to have it look at the numbers first, then the "Dem" values.
But
the concept was perfect. Thanks to both of you again, and I have clicked
on
the "Yes" button to show that the answers you two provided worked.

"T. Valko" wrote:

Try something like this...

=SUMPRODUCT(--(A2:A100="Dem"),--(ISNUMBER(B2:B100)))

Adjust the ranges to suit.

Note that with SUMPRODUCT you *can't* use entire columns as range
references
unless you're using Excel 2007.

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Hi Valko,
Here's a better sample of what I am trying to do:
If you look at the sample below, you will see that I am looking at both
the
Net and Area to gather the number. So if the Area has Dem, count all
the
numbers under the Net. If the Area has Fre, count all the numbers under
the
Net associated with Fre. There are several other items in the Area that
I
did
not list here and unfortunately it varies from day to day with the
number
of
values.

Value Month NET Rpt Cnt Count Area Case
1 1 Dem
Elim Feb 0 1 Dem
1 1 Dem
2 1 Dem
Add March 1 1 Fre
3 1 Fre
2 1 Fre
Elim March 0 1 Fre
Elim Feb 0 1 Fre
Elim Feb 0 1 Fre

4 Dem
6 Fre


"T. Valko" wrote:

If column B *always* has a value of 1 then all you need to do is count
the
instances in column A:

=COUNTIF(A:A,"Dem")
=COUNTIF(A:A,"Fre")

=COUNTIF(A2:A100,"Dem")
=COUNTIF(A2:A100,"Fre")

--
Biff
Microsoft Excel MVP


"Kennedy" wrote in message
...
Trying to find a way to use a countif value that pulls back specific
count
for certain values in a column. Using countif because the cell
contains
a
computed value that returns a value of 1
So if:
Col A Col B
Dem 1
Dem 1
Dem 1
FRE 1
FRE 1
FRE 1

The countif value would show for Dem 3 and Fre 3



.



.



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
Count Employee Work Time - Don't Double-count Overlapping Apts. J Excel Worksheet Functions 0 April 27th 07 05:52 AM
Excel 2000, count, sort a list & count totals? sunslight Excel Worksheet Functions 1 April 9th 07 05:46 PM
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Intervals of 2 Numeric values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 12 September 24th 05 10:58 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


All times are GMT +1. The time now is 03:11 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"