View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Type of Sheet displayed Type of Sheet displayed is offline
external usenet poster
 
Posts: 12
Default Run-time error '1004':

I'm getting a really hard error when I code to put a formula into a worksheet
that works as a normal formula in the worksheet. I'm building 500 tables
(worksheet B) that contain detailed breakdown data for each single entry in
another worksheet (Worksheet A). So for each Worksheet A entry there is a
detailed breakdown table. I'm trying to write code to create the remaining
499 other tables. This is a one time use of code (vice creating each one
manually that cannot be done by recording a macro and running it) to save
time. I'm stuck on this:

Run-time error '1004':

Application-defined or object-defined error

The code above this works fine but this generates the error:

'Now Fix the Formulas for Effort Hours
Worksheets("Data-Tables").Range("F" & (STARTCELL + (OFFSET * _
LoopCounter) + 3)).Formula = "=IF(Utilize_Nominal_Estimate, _
IF(ISERROR((((E626/$E$617)*$C$565)*Sizing!$Z$6)), 'No Entry', _
(((E626/$E$617)*$C$565)*Sizing!$Z$6)), _
IF(ISERROR((((E626/$E$617)*$C$565)*Sizing!$O$6)), 'No Entry', _
(((E626/$E$617)*$C$565)*Sizing!$O$6)))"

I had to break this line up a little more to make it readable here. If I
don't use the ISERROR code the thing runs fine. However, with it the code
crashes. I've started with the formula copied of the worksheet that already
works start using loopcounters, offsets, and such to fix the hard references
to point the the right cells.

Any ideas?

Thanks,

Bryan