Absolute vs Reletive

  • Thread starter Thread starter natei6
  • Start date Start date
N

natei6

Hi all,

I know how to switch a formula from relative to absolute and vic
versa, but is there a way to select a hole range of cells and chang
all the formulas to absolute without changing each one individually?

All the best,

Nathan Sargean
 
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 ----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top