View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default how do i sum if in two different cell references - Excel

=Sumproduct(--(a2:a6="apples"),--(b2:b6="red"))

"blake7" wrote:

Hi, Im trying to write "sumif" or "countif" formula to count when it sees
"apples" in one column and "red" in the other, anyone help?
I have tried the following but it just says "0" (zero)

COUNT(IF(A2:A6="APPLES",IF(B1:B6="RED",0)))

A B
APPLES RED
APPLES GREEN
APPLES GREEN
APPLES RED
APPLES RED
APPLES RED
APPLES RED