P
Paul_B
Hi,
Bernie Deitrick gave this macro to me a few weeks ago for
converting relative to absolute references.
Sub ConvertFormulasToAbsoluteReferences()
Dim mycell As Range
For Each mycell In Selection.SpecialCells(xlCellTypeFormulas)
mycell.Formula = Application.ConvertFormula(mycell.Formula, xlA1,
xlA1, True)
Next mycell
End Sub
It works great, with the proviso that one must select a range
before activating it, or all cells in a sheet will be subject to
the macro.
Therefore, I'd like to add a test to the macro's front end. If no
range is preselected I'd like only the active cell to be
affected; if a range is preselected I'd like the entire range to
be affected, as is the case now.
Thanks for any help. Also hope to learn a bit more about ranges
by this exercise.
p.
Bernie Deitrick gave this macro to me a few weeks ago for
converting relative to absolute references.
Sub ConvertFormulasToAbsoluteReferences()
Dim mycell As Range
For Each mycell In Selection.SpecialCells(xlCellTypeFormulas)
mycell.Formula = Application.ConvertFormula(mycell.Formula, xlA1,
xlA1, True)
Next mycell
End Sub
It works great, with the proviso that one must select a range
before activating it, or all cells in a sheet will be subject to
the macro.
Therefore, I'd like to add a test to the macro's front end. If no
range is preselected I'd like only the active cell to be
affected; if a range is preselected I'd like the entire range to
be affected, as is the case now.
Thanks for any help. Also hope to learn a bit more about ranges
by this exercise.
p.