Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How should the code look like if I want my macro to enter a formula into a cell.
Example Cell A1 is empt I run my macro Cell A1 contains the formula: =IF(B1="";"Ok";"" Any help is appriciated, thank you Schwart |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Schwartz.
Try this Range("A1").FormulaR1C1="=IF(RC[1],"""",""Ok"")" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Dr. Schwartz" wrote in message ... How should the code look like if I want my macro to enter a formula into a cell. Example: Cell A1 is empty I run my macro Cell A1 contains the formula: =IF(B1="";"Ok";"") Any help is appriciated, thank you. Schwartz |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you don't want to use R1C1 syntax, try this :
Range("A1").FormulaLocal="=IF(" & Cells(1,2).Address & " ,"""",""Ok"") -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help writing a formula | Excel Discussion (Misc queries) | |||
writing an IF/AND formula | Excel Worksheet Functions | |||
Need help writing a formula | Excel Worksheet Functions | |||
Writing a formula | Excel Discussion (Misc queries) | |||
Need Help Writing a Formula | Excel Worksheet Functions |