#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Countif


Hi,
I have a table with several column and i want to use "countif" for 2
conditions.
=COUNTIF(A2:A5,"X") is the formula to use for one conditon in one
column.
I would like to use a formula like: =COUNTIF(A2:C5,"X","Y")
I have tried this formula but obviously doesn't work. any suggestion?
thanks a lot

Massimo


--
massi
------------------------------------------------------------------------
massi's Profile: http://www.excelforum.com/member.php...o&userid=29202
View this thread: http://www.excelforum.com/showthread...hreadid=565912

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Countif


Try
=COUNTIF(A2:C5,"X")+COUNTIF(A2:C5,"Y")

or

=SUMPRODUCT(--(A2:C5="Y")+(--(A2:C5="X")))

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=565912

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Countif


I have tried the formula =COUNTIF(A2:C5,"X")+COUNTIF(A2:C5,"Y") but
doesn't work. sumproduct instead is not the one i need as i am not
dealing only with number.

i'll try to explain better:
this is my table where i get the data from

status rev type
---------------------
X 1 dwg
X 1 dwg
X 2 doc
X 3 doc
Z 1 dwg
C 4 doc
A 2 dwg




this is the table where i would like the formula work for me:


dwg doc status
-----------------------
n n X
n n Z
n n C
n n A

where n is the result of the formula.




--
massi
------------------------------------------------------------------------
massi's Profile: http://www.excelforum.com/member.php...o&userid=29202
View this thread: http://www.excelforum.com/showthread...hreadid=565912

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Countif


I think I understand what you want :)

I am quite bad at explaning. So, I have attached an example with this
reply.
Basically, you need to create another column to merge the "type" and
"status" to get the countif to work.

Hope this helps :D


+-------------------------------------------------------------------+
|Filename: countif2.zip |
|Download: http://www.excelforum.com/attachment.php?postid=5122 |
+-------------------------------------------------------------------+

--
teelim


------------------------------------------------------------------------
teelim's Profile: http://www.excelforum.com/member.php...o&userid=36856
View this thread: http://www.excelforum.com/showthread...hreadid=565912

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Countif


Teelim,
it seems it is the thing I need.
thanks a lot.:)


--
massi
------------------------------------------------------------------------
massi's Profile: http://www.excelforum.com/member.php...o&userid=29202
View this thread: http://www.excelforum.com/showthread...hreadid=565912

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumproduct vs. countif Coal Miner Excel Discussion (Misc queries) 1 June 15th 06 09:34 PM
Countif Formula /Sort Bug??? orcfodder Excel Discussion (Misc queries) 2 January 12th 06 10:04 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


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