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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
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

angel_03

New Member
Joined
Jun 27, 2008
Messages
27
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

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
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,191,177
Messages
5,985,140
Members
439,942
Latest member
bkexcel11230

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
Top