Any way to make all references in a cell absolute?

  • Thread starter Thread starter ModelerGirl
  • Start date Start date
M

ModelerGirl

Is there any way to make all references in a cell (or better yet a rang
of cells) absolute
 
Hi ModelerGirl!

This was posted earlier today

Sub Absolute()
'Converts all relative refs in formula to absolute
'Posted by Gord Dibben 27-Feb-2004
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
'line above in ( ) can be altered for varying references as below
'(cell.Formula, xlA1, xlA1, xlAbsRowRelColumn)
'(cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
'(cell.Formula, xlA1, xlA1, xlRelative)
End Sub

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top