Hi!
I have a big workbook that evolves around a cell (O3)
In this case O3=11, but this number/cell changes several times during a working day.
When running the macro, I need the vba to hardcode a formula to A2 with a number from cell O3
The working formula is:
In vba i tried this:
However this is not working...
I get it to work up to the point where i start addig the "IF" statement, but after that everything creates "Object missing" message
Anyone that can crack this?
Best reggards:
Wigarth
I have a big workbook that evolves around a cell (O3)
In this case O3=11, but this number/cell changes several times during a working day.
When running the macro, I need the vba to hardcode a formula to A2 with a number from cell O3
The working formula is:
Excel Formula:
=IF(sheet1!B11=0,0,sheet1!B11) <-- where 11 is the value from the cell O3
In vba i tried this:
VBA Code:
Range("A2").Formula = "=IF(Sheet1!B" & [O3].Value & "=0,0,Sheet1!B" & [O3].Value & ")"
However this is not working...
I get it to work up to the point where i start addig the "IF" statement, but after that everything creates "Object missing" message
Anyone that can crack this?
Best reggards:
Wigarth