ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   can countif function look at 2 separate columns for criteria (https://www.excelbanter.com/excel-worksheet-functions/77882-can-countif-function-look-2-separate-columns-criteria.html)

blake7

can countif function look at 2 separate columns for criteria
 
I want to use the countif function in excel to look at one criteria in one
column and another criteria in another before summing up, can this be done ?

Peo Sjoblom

can countif function look at 2 separate columns for criteria
 
No but you can use SUMPRODUCT,

assume you want to count values in A1: A10 that are greater than 5 and has
the colour red in B1: B10

=SUMPRODUCT(--(A1:A105),--(B1:B10="red"))

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"blake7" wrote in message
...
I want to use the countif function in excel to look at one criteria in one
column and another criteria in another before summing up, can this be done
?



Daniel CHEN

can countif function look at 2 separate columns for criteria
 
try to use the following array function:
(array function end with Ctrl+Shift+Enter)

=COUNT(IF((($A$2:$A$8)="A")*(($B$2:$B$8)="A"),$C$2 :$C$8))

--
Best regards,
---
Yongjun CHEN
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download

"blake7" wrote in message
...
I want to use the countif function in excel to look at one criteria in one
column and another criteria in another before summing up, can this be done
?





All times are GMT +1. The time now is 06:58 PM.

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