Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I've a VBA Macro. This should write a formular like =wenn(xy;"ja";"nein") in a cell. I tried this: Range("B9").value = "=wenn(xy;"ja";"nein")" I think there is also a problem with executing this formular. Can somebody help me, please? Thank you! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matthias,
The quotation marks inside you IF formula need to be doubled, i.e. Change: "=wenn(xy;"ja";"nein")" to: "=wenn(xy,""ja"",""nein"")" Of course this IF formula will return an error unless xy represents a logical condition which the worksheet can evaluate. --- Regards, Norman "Matthias Frohnapfel" wrote in message ... Hello, I've a VBA Macro. This should write a formular like "=wenn(xy;"ja";"nein")" in a cell. I tried this: Range("B9").value = "=wenn(xy;"ja";"nein")" I think there is also a problem with executing this formular. Can somebody help me, please? Thank you! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
there is still an error. This is my real formula: Range("B9").Value = "=WENN(B28(B22+0,75*(B29-B22));""ja"";""nein"")" I want to write the formula =WENN(B28(B22+0,75*(B29-B22));""ja"";""nein"") into a cell. After that, Excel should execute this formula, so that I get "ja" or "nein". Thank you! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matthias,
The English version of your formula is : =IF(B28(B22+0.75*(B29-B22)),"ja","nein") Using the VBA expression: Range("B9").Value = "=IF(B28(B22+0.75*(B29-B22)),""ja"",""nein"")" returns ja (or nein) in cell B9 for me. As I have an English version of Excel, I cannot test, but I can see no reason why, if the equuivalent German worksheet function exprssion: =WENN(B28(B22+0,75*(B29-B22));"ja";"nein") works, the VBA expression: Range("B9").Value = "=WENN(B28(B22+0,75*(B29-B22));""ja"";""nein"")" should return an error. --- Regards, Norman "Matthias Frohnapfel" wrote in message ... Hello, there is still an error. This is my real formula: Range("B9").Value = "=WENN(B28(B22+0,75*(B29-B22));""ja"";""nein"")" I want to write the formula =WENN(B28(B22+0,75*(B29-B22));""ja"";""nein"") into a cell. After that, Excel should execute this formula, so that I get "ja" or "nein". Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
writing macros in excel sheet | Excel Worksheet Functions | |||
Reading data from an excel sheet and writing to another | Excel Programming | |||
Writing value in cell in another sheet | Excel Programming | |||
writing to excel sheet | Excel Programming | |||
writing array into excel sheet | Excel Programming |