View Single Post
  #4  
Old May 10th, 2010, 10:04 PM posted to microsoft.public.excel.setup
Gord Dibben
external usenet poster
 
Posts: 20,252
Default How to globally insert $ signs in front of all cell refereces?

Pick from these 4 macros.

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)
End If
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)
End If
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)
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Mon, 10 May 2010 11:32:01 -0700, MDV
wrote:

Is there a way to insert $ signs in front of certain cell characters on a
global basis?

I am facing having to click on each cell reference in a large spreadsheet
and hit F4 each time to insert the $ signs to anchor the cell reference. If
anyone knows of a way to change the entire spreadsheet to insert the $ signs
into each cell reference, I would very much appreciate hearing from you.

Thank you,
Mary