View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Cora Cora is offline
external usenet poster
 
Posts: 3
Default How to use SUMPRODUCT in macro?

"Bob Phillips" wrote in news:e7d9J
:

ActiveCell.FormulaR1C1Local = "=SUMPRODUCT(('C1:C10 = 1)*(D1:D10 =
"Ya"))"



No

ActiveCell.Formula = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))"

Didn't work (#Name? appears in cell)

ActiveCell.FormulaR1C1Local = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10 = ""Ya""))"

Give the good result