|
-
March 22nd, 2001, 06:40 PM
#1
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
-
March 22nd, 2001, 08:10 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|