Excel: Formulas to absolute references
Random formulas for converting formulas to absolute references, from https://stackoverflow.com/questions/51169108/change-multiple-cell-references-from-relative-to-absolute-at-once
Sub convertAllSheetFormulasToAbsolute()
Dim oCell As Range
With ActiveSheet
For Each oCell In .Cells.SpecialCells(Type:=xlCellTypeFormulas)
oCell.Formula = Application.ConvertFormula(oCell.Formula, xlA1, xlA1, xlAbsolute)
Next
End With
End Sub
Sub Formulas_To_AbsoluteReference()
Dim oCell As Range
With Selection
For Each oCell In .Cells.SpecialCells(Type:=xlCellTypeFormulas)
oCell.Formula = Application.ConvertFormula(oCell.Formula, xlA1, xlA1, xlAbsolute)
Next
End With
End Sub
Sub Formulas_To_LockRowNumber_RelColumnLetter()
Dim oCell As Range
With Selection
For Each oCell In .Cells.SpecialCells(Type:=xlCellTypeFormulas)
oCell.Formula = Application.ConvertFormula(oCell.Formula, xlA1, xlA1, xlAbsRowRelColumn)
Next
End With
End Sub
Sub FormulasTo_LockColLetter_RelRowNum()
Dim oCell As Range
With Selection
For Each oCell In .Cells.SpecialCells(Type:=xlCellTypeFormulas)
oCell.Formula = Application.ConvertFormula(oCell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
Next
End With
End Sub
Sub FormulasTo_AllRelative_Reference()
Dim oCell As Range
With Selection
For Each oCell In .Cells.SpecialCells(Type:=xlCellTypeFormulas)
oCell.Formula = Application.ConvertFormula(oCell.Formula, xlA1, xlA1, xlRelative)
Next
End With
End Sub