Help w/ simply Macro (delete cells and re-spread formulas)

Solaxun

New Member
Joined
Dec 4, 2012
Messages
2
I have a form control button I am trying to use to delete a range of cells and refill, but I do not want the formula references to shift if I add rows/columns. I am aware of naming the range but I cannot think of an appropriate way to apply that fix in this scenario.

Ideally I would like to do something as simple as "delete I20:J20" , then "undo" but obviously you can't undo within a macro as far as I know. What I have resorted to is deleting this range, then retyping the formulas (using record macro because I am way too amateur for writing VBA). However since I have to retype the formula in the first cell of the row before spreading it right, the named range solution is of little use as the individual cells that i re-type the formula in do not utilize the named range, only the initial deletion does.

How can I implement this, I find it surprising there is no way to fix cell references within a macro aside from naming the range.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,216,460
Messages
6,130,771
Members
449,589
Latest member
Hana2911

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