#1   Report Post  
acyakos
 
Posts: n/a
Default Countif/And Function

I am trying to count the number of occurrences in a column based on two
criteria. For example, I would like to count how many times the letter 'N'
appears in column E, but only if the value in column A is equal to 0016. Can
this be done using the COUNTIF or AND functions?? (basically I would like to
count the number of cells in column E with a value of N in column E AND a
value of 0016 in column A)

Hopefully this makes sense...

Thanks!
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT(--(A1:A100="0016"),--(E1:E100="N"))

OR

=SUMPRODUCT(--(A1:A100=G1),--(E1:E100=H1))

....where G1 contains your first criterion, such as 0016, and H1 contains
your second, such as N.

Hope this helps!

In article ,
"acyakos" wrote:

I am trying to count the number of occurrences in a column based on two
criteria. For example, I would like to count how many times the letter 'N'
appears in column E, but only if the value in column A is equal to 0016. Can
this be done using the COUNTIF or AND functions?? (basically I would like to
count the number of cells in column E with a value of N in column E AND a
value of 0016 in column A)

Hopefully this makes sense...

Thanks!

  #3   Report Post  
acyakos
 
Posts: n/a
Default

Thanks so much Domenic! That works perfectly and saves a lot of time.

"Domenic" wrote:

Try...

=SUMPRODUCT(--(A1:A100="0016"),--(E1:E100="N"))

OR

=SUMPRODUCT(--(A1:A100=G1),--(E1:E100=H1))

....where G1 contains your first criterion, such as 0016, and H1 contains
your second, such as N.

Hope this helps!

In article ,
"acyakos" wrote:

I am trying to count the number of occurrences in a column based on two
criteria. For example, I would like to count how many times the letter 'N'
appears in column E, but only if the value in column A is equal to 0016. Can
this be done using the COUNTIF or AND functions?? (basically I would like to
count the number of cells in column E with a value of N in column E AND a
value of 0016 in column A)

Hopefully this makes sense...

Thanks!


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



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