View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default How to Count values inside a cell when refered elsewhere?

One way

=SUMPRODUCT((A1:J1="a")*(A2:J2))

Mike

"littlejess22" wrote:


Hi, Hope you can help.....

A1 - A10 contains: A,A,B,C,B,B,C,A,A,C
B1 - B10 contains: 10,5,10,3,5,5,10,7,5,10

How can I add up the contents of the cells that relate to 'A' i.e. answer
should be 27 (10+5+7+5) I've tried - SUMIF, IF(SUM), SUM(COUNTIF) and I
still can't get it to look at A1-A10 and then add up those in B1-B10 that
relate.

Thanx