View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Countif by match two columns

=SUMPRODUCT(--(A1:A13=A2),--(G1:G13=A2),D1:D13)


See this for more examples:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Regards,
Ryan--


--
RyGuy


"Haz" wrote:

Hi

I am trying to match 2 cells in different cols and then sum the adjcent cols
up.

In A2 i have A002 I would like to find this in Col G then sum d2 and
subtract this from j2 if there is a match.

Any help would be appreciated.

Thanks