VBA Absolute

Nickalas

New Member
Joined
Aug 19, 2010
Messages
17
Howdy,

I'm trying to convert multiple formulas in order to make them absolute, so that I can copy and paste them into other worksheets without the formulas changing e.g. from A1 to $A$1.

After searching this forum I found this bit of code:

Sub test()
Dim c As Range
For Each c In Selection
c.Formula = Application.ConvertFormula(c.Formula, xlA1, , xlAbsolute)
Next
End Sub

It works great unless there is a table reference or alike in the formula in which case the cell is converted to "#value".

e.g.

=D164+SUMIFS(CR.Table[Expenses Cost (OPEX)],CR.Table[Status],"Forecast",CR.Table[Project Phase],"Phase 2/3/4")

Does anyone know if there is a way to ignore/only update what's required please?

Any help would be greatly appreciated. (My VBA skills suck)

Nick
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,191,165
Messages
5,985,036
Members
439,935
Latest member
Monty238

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top