Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
% variance calculation - amended
Sub Macro2()
Dim exptype exptype = InputBox("Enter e if expense type.") If exptype = "e" Then ActiveCell.FormulaR1C1 = "=-(RC[-1]/RC[-2]-1)" Else ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-2]-1)" End If End Sub Pls help - why i'm not getting any result if exptype is not equal to e thxs |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
% variance calculation - amended
Check the formula you have when exptype is not e. Is it syntactically
correct? Specifically, check the parenthesis use. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article .com, says... Sub Macro2() Dim exptype exptype = InputBox("Enter e if expense type.") If exptype = "e" Then ActiveCell.FormulaR1C1 = "=-(RC[-1]/RC[-2]-1)" Else ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-2]-1)" End If End Sub Pls help - why i'm not getting any result if exptype is not equal to e thxs |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table and variance calculation | Excel Discussion (Misc queries) | |||
Pivot Tables - Variance and Variance % | Excel Discussion (Misc queries) | |||
% variance calculation | Excel Programming | |||
Pivot Tables - Variance and % Variance fields | Excel Discussion (Misc queries) | |||
Variance calculation | Excel Worksheet Functions |