LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Using COUNTIF with Two or more Columns as Criteria

I am trying to use COUNTIF to look at two or more columns. For example,
"Apple" is listed several times in Column A and Tree is listed several times
in Column E. I want to count all of the occasions where "Apple" in Column A
and "Tree" in Column E are present together. I wrote the function like this,
but couldn't get it to return the right answer: =COUNTIF('Sorted
Data'!$A$2:$A$564,"=Apple") + COUNTIF('Sorted Data'!E$2:E$564,"=Tree")

It seems as though the "+" sign is telling it to count both the times
"Apple" is in Column A and when "Tree" is in Column E, so I get the total
number of times "Apple" is in Column A, plus the times "Tree" is in Column E.
How can I get it to only count the number of times that "Apple" is in Column
A and "Tree" is in Column E at the same time? This seems like a simple fix,
but I cannot figure out what to put in there in place of the "+" sign. I
tried "or", but no luck. Thanks.
 
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
countif two columns two criteria Doris[_2_] Excel Worksheet Functions 6 May 5th 08 07:44 PM
Countif Criteria (2 diff columns) Teddy-B Excel Discussion (Misc queries) 4 October 19th 07 08:44 PM
COUNTIF with criteria in 2 columns EJ Excel Discussion (Misc queries) 3 December 20th 06 01:02 PM
Countif using criteria in multiple columns ImaGina Excel Worksheet Functions 1 September 14th 06 07:31 PM
Countif - Two Criteria in two columns are met. samprince Excel Discussion (Misc queries) 11 June 28th 06 04:58 PM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"