View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] hermac@telenet.be is offline
external usenet poster
 
Posts: 5
Default Formula building code : what's wrong with this little sub?

Hello,
I have a table that is supposed to show the change in another
(parallel) table after changing inputs in a simulation model.
Can you figure what 's wrong with the code below?

Sub Macro3()
Dim c As Range
For Each c In Range("P44:Z54").Cells
c.Formula = "=" & c.Offset(0, -14).Address(0, 0) & "-" & c.Offset(0,
-14).Value
Next c
End Sub

Thank you very much for your remarks !!
Herman