View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jack Sheet Jack Sheet is offline
external usenet poster
 
Posts: 47
Default sumif countif thing?

Good Catch.
My Bad.

My solution could have been changed only very slightly to correct for that:

=SUM((COUNTIF(OFFSET(C1,ROW(INDIRECT("1:998")),0,1 ,12),"=textvalue1")0)*(COUNTIF(OFFSET(C1,ROW(INDI RECT("1:998")),0,1,12),"=textvalue2")0))

But your solution is more elegant even so.

Apologies if this has been posted multiple times.


"daddylonglegs"
wrote in message
news:daddylonglegs.2b5t6v_1153257008.7595@excelfor um-nospam.com...

Hi Jack,

I think there's a potential problem with your solution. If textvalue1
appears twice in a single row in which textvalue 2 also appears that
will be counted twice.

To combat that you could use this formula

=COUNT(1/(FREQUENCY(IF(C2:N999="textvalue1",ROW(C2:N999)),R OW(C2:C999)-ROW(C$2)+1)*(FREQUENCY(IF(C2:N999="textvalue2",ROW (C2:N999)),ROW(C2:C999)-ROW(C$2)+1))))

confirmed with CTRL+SHIFT+ENTER


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=562529