ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count IF (https://www.excelbanter.com/excel-worksheet-functions/194812-count-if.html)

Romanli

Count IF
 
I want to count text/numbers in a range of cells based on a certain criteria
only the informaiton in another column (same row) meets specific criteria.

Bernard Liengme

Count IF
 
You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific criteria.



Romanli

Count IF
 
=IF(Installed!J151:J158,US,COUNTIF(Installed!N151: N158,green))

If item in one column =US, then count if item in second column =Green.

This is what I want (in theory anyway), but the way I have typed it gives me
a value error.

I definly only want counts, becuase it is all text.

"Bernard Liengme" wrote:

You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific criteria.




Dave Peterson

Count IF
 
=sumproduct(--(installed!j151:j158="US"),--(installed!n151:n158="Green"))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


If you're using xl2007, you may want to look at =countifs().

Romanli wrote:

=IF(Installed!J151:J158,US,COUNTIF(Installed!N151: N158,green))

If item in one column =US, then count if item in second column =Green.

This is what I want (in theory anyway), but the way I have typed it gives me
a value error.

I definly only want counts, becuase it is all text.

"Bernard Liengme" wrote:

You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific criteria.




--

Dave Peterson

Bernard Liengme

Count IF
 
"but you can't use whole columns" except in XL2007
Bernard


"Dave Peterson" wrote in message
...
=sumproduct(--(installed!j151:j158="US"),--(installed!n151:n158="Green"))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and
falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


If you're using xl2007, you may want to look at =countifs().

Romanli wrote:

=IF(Installed!J151:J158,US,COUNTIF(Installed!N151: N158,green))

If item in one column =US, then count if item in second column =Green.

This is what I want (in theory anyway), but the way I have typed it gives
me
a value error.

I definly only want counts, becuase it is all text.

"Bernard Liengme" wrote:

You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific
criteria.



--

Dave Peterson



Romanli

Count IF
 
THANKS! It worked!

"Bernard Liengme" wrote:

"but you can't use whole columns" except in XL2007
Bernard


"Dave Peterson" wrote in message
...
=sumproduct(--(installed!j151:j158="US"),--(installed!n151:n158="Green"))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and
falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


If you're using xl2007, you may want to look at =countifs().

Romanli wrote:

=IF(Installed!J151:J158,US,COUNTIF(Installed!N151: N158,green))

If item in one column =US, then count if item in second column =Green.

This is what I want (in theory anyway), but the way I have typed it gives
me
a value error.

I definly only want counts, becuase it is all text.

"Bernard Liengme" wrote:

You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific
criteria.



--

Dave Peterson




Dave Peterson

Count IF
 
Thanks for the addendum, Bernard.

(I copied from a very old post <bg.)

Bernard Liengme wrote:

"but you can't use whole columns" except in XL2007
Bernard

"Dave Peterson" wrote in message
...
=sumproduct(--(installed!j151:j158="US"),--(installed!n151:n158="Green"))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and
falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


If you're using xl2007, you may want to look at =countifs().

Romanli wrote:

=IF(Installed!J151:J158,US,COUNTIF(Installed!N151: N158,green))

If item in one column =US, then count if item in second column =Green.

This is what I want (in theory anyway), but the way I have typed it gives
me
a value error.

I definly only want counts, becuase it is all text.

"Bernard Liengme" wrote:

You want to COUNT or SUM?
See COUNTIF and SUMIF in Help, then coma back with more questions
Also have a look at SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Romanli" wrote in message
...
I want to count text/numbers in a range of cells based on a certain
criteria
only the informaiton in another column (same row) meets specific
criteria.



--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com