View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Warren Easton Warren Easton is offline
external usenet poster
 
Posts: 81
Default Convert selected formula references from relative to absolute

Thanks for that.
--
Regards
Warren


"Gord Dibben" wrote:

Yes.

Here is the full set........................

Sub Absolute()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlAbsolute)
End If
Next
End Sub

Sub AbsoluteRow()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlAbsRowRelColumn)
Next
End Sub

Sub AbsoluteCol()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
Next
End Sub

Sub Relative()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlRelative)
Next
End Sub


Gord

On Thu, 30 Oct 2008 09:30:15 -0700, Warren Easton
wrote:

Hi Gord,

I'm new at this but would this also work in reverse from absolute to
relative if you change the text "absolute" to "relative" in the Macro below?