View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default how to count rows if 2 columns partially match

Hi,

Am Thu, 25 Oct 2012 15:35:01 +0000 schrieb Qikstart:

I am trying to count rows based on following pseudo-code:
if (cellA&"*" matches colARange) AND "text" matches colBRange)
count

columns:
taska new
taskb closed
taskc closed
problema closed
problemb new
problemc closed

task
problem


for task and closed try:
=SUMPRODUCT(--(LEFT(A72:A77,4)=A81),--(B72:B77="closed"))
or with excel version 2007 or 2010:
=COUNTIFS(A72:A77,A81&"*",B72:B77,"closed")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2