I try to assign a formula to a cell via an Macro in Excel:
Worksheets("Jan").Cells(30,J).Formula= "=ADDRESS(24;3)"
This doesn’t work. Assigning a formula like "=1+1" works.
The strange thing is, when i enter the above formula directly in Excel to a cell it works. What am I missing?
Well, you have a couple of problems in that line of code.
Unless
Jis a variable not shown,.Cells(30,J)should be.Cells(30, "J")Also,
"=ADDRESS(24;3)"should be"=ADDRESS(24,3)". You separate the values with a comma, not a semicolon.