Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nde Nde is offline
external usenet poster
 
Posts: 16
Default Error 1004 - Application-defined or Object-defined error

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Error 1004 - Application-defined or Object-defined error

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.

"nde" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error 1004: Application defined or object defined error Access n00b Excel Programming 2 April 5th 06 02:58 AM
Run Time Error 1004 - Application-defined or object-defined error brent Excel Programming 2 October 3rd 05 05:23 PM
Run-time Error 1004: Application-defined or Object-defined Error Adrian Excel Programming 6 August 23rd 05 06:28 AM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"