Friday 31 December 2021

Macro to convert the reference from relative to absolute for a selected range of cell

Note: Before you run this macro, ensure you have selected the cells, whose reference you want to convert


Sub Relative_to_Absolute()

Dim fmlaCells As Range

On Error Resume Next

Set fmlaCells = Selection

fmlaCells.Formula = Application.ConvertFormula _

(fmlaCells.Formula, xlA1, xlA1, xlAbsolute)

End Sub


 

No comments:

Post a Comment