changing relative to absolute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have a lot of functions in which there are relatative reference ranges, is
there a n easier way change them to absolute other than selecting each cell
individually and hitting F4?. Like can I select a range of cells and press a
button and those cells change to absolute
 
Hi Paul,

you can do this programmaticaly. Search help for convertformula method.

Regards,

Ivan
 
Paul

By VBA only.


Sub Absolute()
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


Sub AbsoluteRow()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlAbsRowRelColumn)
End If
Next
End Sub


Sub AbsoluteCol()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelRowAbsColumn)
End If
Next
End Sub


Sub Relative()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelative)
End If
Next
End Sub


Gord Dibben MS Excel MVP


Hello

I have a lot of functions in which there are relatative reference ranges, is
there a n easier way change them to absolute other than selecting each cell
individually and hitting F4?. Like can I select a range of cells and press a
button and those cells change to absolute

Gord Dibben MS Excel MVP
 

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