Error 1004 - Application-defined or Object-defined error

N

nde

Hi,

I do have a 1004 error using the following code. Any Sggestion...I use
similar code in an other macro and it works fine.

ActualToReport = "=SUMIF('Actuels Finance PUID'!C1,''" + ActiveCell.Value +
"'','Actuels Finance PUID'!C" + Trim(Str(ColumnCounter - 2)) + ")"

Worksheets("ReForecast - Detailed").Cells(CurrentRow, ColumnCounter).Formula
= ActualToReport

Thanks,
nde
 
M

Madhan

Hi, the SUMIF function takes a range of cells as the first parameter, a
condition or criteria to be satisfied within the first parameter and another
range or cells as the third parameter. The third parameter contains the
actual data to be added. For example, consider the following data.
C D
1 5 200
2 7 300
3 9 400

The formula, SUMIF(c1:c3,">5",d1:d3) will produce the result 700. Please
change your code appropriately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top