![]() |
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 |
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 |
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. :confused: -- massi ------------------------------------------------------------------------ massi's Profile: http://www.excelforum.com/member.php...o&userid=29202 View this thread: http://www.excelforum.com/showthread...hreadid=565912 |
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 |
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 |
All times are GMT +1. The time now is 02:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com