VBA String "=Wenn(F43-E43>0;F43-E43;"""")"
Hey VB experts,
I want to assign a formula to a cellobject:
Worksheets(4).Cells(43, 11) = "=Wenn(F43-E43>0;F43-E43;"""")"
VBA is not accepting the semicolon in the string. How can I force VBA to compile this expression.
Any answer will be appreciated
Jochen
Re: VBA String "=Wenn(F43-E43>0;F43-E43;"""")"
I don't know what Wenn is but if you are trying to do an if statement, the following should work:
Worksheets(1).Cells(43, 11).Formula = "=IF(F43-E43>0,F43-E43,"""")"
The above code may also work with your Wenn statement.
Hope this helps,
Nathan.