Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumproduct vs. countif | Excel Discussion (Misc queries) | |||
Countif Formula /Sort Bug??? | Excel Discussion (Misc queries) | |||
COUNTIF or not to COUNTIF on a range in another sheet | Excel Worksheet Functions | |||
Combining IF and COUNTIF based on two columns | Excel Discussion (Misc queries) | |||
Countif - Countif | Excel Worksheet Functions |