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


 

Wednesday 29 December 2021

Macro to trace dependents for a range of cells

 Sub TraceDependents()


'updateby Extendoffice

    Dim xRg As Range

    Dim xCell As Range

    Dim xTxt As String

    On Error Resume Next

    xTxt = ActiveWindow.RangeSelection.Address

    Set xRg = Application.InputBox("Please select the data range:", xTxt, , , , , 8)

        If xRg Is Nothing Then Exit Sub

    For Each xCell In xRg

        xCell.ShowDependents

    Next

End Sub



Source: https://www.extendoffice.com/documents/excel/3402-excel-trace-dependents-multiple-cells.html