Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can change the RowAbsolute and ColumnAbsolute values of the Address eg:
Sub Variance1() Dim actual As Range Dim std As Range Dim exptype As String exptype = InputBox("Enter e if expense type, else blank.") On Error Resume Next Set actual = Application.InputBox( _ prompt:="Select cell for Actual data.", Type:=8) Set std = Application.InputBox( _ prompt:="Select cell for Standard data.", Type:=8) On Error GoTo 0 If Not actual Is Nothing And Not std Is Nothing Then If exptype = "e" Then ActiveCell.Formula = "=-(" & actual.Address(0, 0) _ & "/" & std.Address(0, 0) & "-1)" Else ActiveCell.Formula = "=" & actual.Address(0, 0) & _ "/" & std.Address(0, 0) & "-1" End If End If Selection.Style = "Percent" End Sub Regards Rowan al wrote: Thxs a lot - what should I amend to get a relative formula instead of an absolute formula as is the case thxs |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple calculation where values change to letters? | Excel Worksheet Functions | |||
Calculation options change arbitrarily | Excel Worksheet Functions | |||
the calculation tab being changed and you didn't change it? | Excel Discussion (Misc queries) | |||
why does the calculation summery not change | Excel Discussion (Misc queries) | |||
How do I make the now() static and not change with calculation? | Excel Worksheet Functions |