Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If-statement in Macro
My macro should check several cells (in the example below it's just one D10) for their value and based on that, write a 0 or a 1 into cell B4 That works so fine so far (also I have some doubts on the type/forma of the number written into B4). The value in B4 now should be used a an argument in an if-statement (still in the macro). Doesn't work Sometimes executes the 'if' and sometimes the 'else'... Range("B4").Value = "=IF(D102,0,1)" If Range("B4").Value = 1 Then ... Else ... End If Any help appreciated, cheers Fabaliciou -- fabaliciou ----------------------------------------------------------------------- fabalicious's Profile: http://www.excelforum.com/member.php...nfo&userid=807 View this thread: http://www.excelforum.com/showthread.php?threadid=26751 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to If Statement | Excel Discussion (Misc queries) | |||
If Statement to run a macro | Excel Discussion (Misc queries) | |||
can i use an IF Statement to run a macro? | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
use of Macro in If statement | Excel Programming |