Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have typed the following code and when executed the formula shows in the cell not the number. What do I do?
Public Sub FormulaTest_Click( Range("E2").Selec If Range("A1").Value = "Input" Then Range("F2").Formula = "C2 + C3 If Range("A1").Value = "% of Rev" Then Range("F2").Formula = "C2*.5 End Su Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Make sure you include the equals sign in the formula property, just like a regular formula.. "=C2+C3
----- bruce forster wrote: ---- I have typed the following code and when executed the formula shows in the cell not the number. What do I do? Public Sub FormulaTest_Click( Range("E2").Selec If Range("A1").Value = "Input" Then Range("F2").Formula = "C2 + C3 If Range("A1").Value = "% of Rev" Then Range("F2").Formula = "C2*.5 End Su Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need = before the formula otherwise Excel sees it a text.
If Range("A1").Value = "Input" Then Range("F2").Formula = "=C2 + C3" If Range("A1").Value = "% of Rev" Then Range("F2").Formula = "=C2*.5" HTH Ian -- Remove NG from my address to send direct. ----- "bruce forster" wrote in message ... I have typed the following code and when executed the formula shows in the cell not the number. What do I do?? Public Sub FormulaTest_Click() Range("E2").Select If Range("A1").Value = "Input" Then Range("F2").Formula = "C2 + C3" If Range("A1").Value = "% of Rev" Then Range("F2").Formula = "C2*.5" End Sub Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search formula showing results plus 100 characters | Excel Discussion (Misc queries) | |||
IF formula only showing positive results | Excel Discussion (Misc queries) | |||
Showing negative values for formula results in red | Excel Discussion (Misc queries) | |||
Showing Cummulative Top5 results with an array-formula...? | Excel Worksheet Functions | |||
showing multiple results to a formula | Excel Worksheet Functions |