View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How to use SUMPRODUCT in macro?

Odd.

Can you try this for me?

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Cora" wrote in message
...
"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