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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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
Back
Top