Runtime Error 1004

angel_03

New Member
Joined
Jun 27, 2008
Messages
27
hi,

i have programmed the formula below formula for my reports..however i get an error msg which says

"Runtime Error 1004: Application or object defined error"

Range("L276").formula = "=IF(H276<M276,((H276*$J$3)+(M276*(12-$J$3)))/12,((H276*$J$3)+(H276*(12-$J$3)))/12"

i have also defined my worksheet that should be called...

what could be my mistake?:confused:
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi

By the looks of it, your formula has been truncated - quite possibly because you used a < sign in the message (these get interpreted as html unless you use a space after them eg:

"=IF(H37< A38,1,0)"
 
Upvote 0
Hi

By the looks of it, your formula has been truncated - quite possibly because you used a < sign in the message (these get interpreted as html unless you use a space after them eg:

"=IF(H37< A38,1,0)"
"=IF(H530 < M530,((H530*$J$3)+(M530*(12-J3)))/12,((H530*$J$3)+
(H530*(12-J3)))/12"

i have tried that too...but i have another formula which contains a similar statement in my codes, however only this gives out an error msg...

have tried changing the signs but it gives mt the same error
 
Upvote 0
You look like you might be missing a ) off of the end:

"=IF(H530 < M530,((H530*$J$3)+(M530*(12-J3)))/12,((H530*$J$3)+
(H530*(12-J3)))/12)"
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,375
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top