![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 25
|
I am trying to countif based on two columns. =countif(A1:A35,"s-j" and B1:B35,"false"). Both values in cooresponding rows must be true to add to the count.
I think the AND function in conjunction with COUNTIF might be applicable, but haven't gotten it to work yet. Thanks! |
|
|
|
|
|
#2 | |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Quote:
=SUM((A1:A35="s-j")*(B1:B35="false")) This is an array formula, press ctrl-shift-enter after you enter it into the formula bar. It should be surrounded by { } if entered properly. You can then copy normally. Last question along these lines, Aladin Akyurek used sumproduct(), if you want a non-array solution, use the wizard to piece this variety together. _________________ Cheers, NateO ![]() [ This Message was edited by: NateO on 2002-05-14 14:15 ] |
|
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Apr 2002
Location: Kissimmee, Florida
Posts: 384
|
Quote:
_________________ ![]() [ This Message was edited by: s-o-s on 2002-05-14 14:21 ] |
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=SUMPRODUCT(A1:A35,"s-j")*(B1:B35=FALSE)) If "false" is text, use: =SUMPRODUCT(A1:A35,"s-j")*(B1:B35="false")) |
|
|
|
|
|
|
#5 | |
|
Board Regular
Join Date: Apr 2002
Location: Kissimmee, Florida
Posts: 384
|
Quote:
=SUM(IF(A1:A15="s-j",IF(B1:B15=FALSE,1,0),0)) I've just misposted and seen NateO has used another alternative.
__________________
Hope This Helps. Sean. Digest of Homes WinXP, XL XP |
|
|
|
|
|
|
#6 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Good point Aladin, if you hard enter false in column B, don't use the quotes, it should default to the logical value Aladin's referring to. If it's a formula based text result, quote away. Same methodology with the array I posted earlier.
_________________ Cheers, NateO ![]() [ This Message was edited by: NateO on 2002-05-14 14:24 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|