ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Absolute references in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/127299-absolute-references-cell.html)

Glennk

Absolute references in a cell
 
I have 30 pairs of cell refs in a cell that need to be converted to all
Absolutes. I need to do this over 60 cells. Please can someone provide a
handy macro that will run this conversion - I have tried some I found in this
forum but they cause #VALUE errors.
Cell example: =(x*y)+(a*b)+(c*d)....etc

Thanks

Bob Phillips

Absolute references in a cell
 
Sub MakeAbsolute()
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 cell
End Sub




--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Glennk" wrote in message
...
I have 30 pairs of cell refs in a cell that need to be converted to all
Absolutes. I need to do this over 60 cells. Please can someone provide a
handy macro that will run this conversion - I have tried some I found in
this
forum but they cause #VALUE errors.
Cell example: =(x*y)+(a*b)+(c*d)....etc

Thanks





All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com