Absolute cell references

  • Thread starter Thread starter ams228
  • Start date Start date
A

ams228

I need to convert serveral lines and columns of variable cell reference
to absolute cell references without doing them one at a time. Doe
anyone know a way to do it more quickly?:confused
 
This is a copy taken from Google

Try the sub by Gord Dibben below
(always try any macro on a back-up copy of your file first)

Paste the sub - i.e. everything within "begin vba" to "end vba"
into a general module

Select the cells you want changed, and then run the sub

------- begin vba ----
Sub Absolute()
'By Gord Dibben
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
---- end vba ----
 
How easy depends on how many different cell references you have. If you're
lucky you can just use CTRL H (find/replace) A1 with $A$1 for example.
 
Back
Top