View Single Post
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You have an extra parenthesis after the first xlDown, and I believe you
need to use commas rather than semicolons:

Worksheets(2).Cells(22, 7).Formula = _
WorksheetFunction.SumIf(Range([F16], [F16].End(xlDown)), _
"VRAI", Range([B16], [B16].End(xlDown)))

Alternatively, if you're trying to actually input the formula in the
cell, rather than the result (using English SUMIF - don't know what the
French is...):

Worksheets(2).Cells(22, 7).Formula = _
"=SumIf(" & Range([F16], [F16].End(xlDown)).Address & _
";""VRAI"";" & Range([B16], [B16].End(xlDown)).Address & ")"



In article ,
"imej-clavier" wrote:

Hello,
Could somebody say to me what's wrong with my formula ,
Worksheets(2).Cells(22,7).Formula = WorksheetFunction.SumIf(Range([F16], _
[F16].End(xlDown)));"VRAI";Range([B16],[B16].End(xlDown)))
I have the following Message Box : Wanted : list separator or ]

Thank you in advance,


Jean-michel