How do I keep my formulas from changing when I run my macro?

mightymorgs

New Member
Joined
Dec 22, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I have a rather large workbook I use to analyze data from different sources. I copy and past data into 16 different worksheets and then use VBA to format the data so it's readable. The data is pulled in to a single worksheet I use to rollup all of the information into a table with a pie chart. Everything works the way I expect it to but one column doesn't calculate once the macro runs. Since the macro format data in several of the worksheets, it messes up the formulas in that last column and gives me a "REF" error. I need to find a way to lock the formulas in that last column so that I don't have to go back and repoint to the correct reference cells once the macro runs. I tried locking all the cells with formulas and I tried to turn off automatic calculations until the macro runs and neither option did the trick. I'm convinced that there HAS to be a way to do this...

TLDR: I need to lock formulas on one worksheet in a workbook so that they point to the same columns on a separate worksheet regardless of whether there is data in those particular cells or not.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
How about instead of using cell addresses in your formulas you use named ranges...
 
Upvote 0
How about instead of using cell addresses in your formulas you use named ranges...
I hadn't thought to try that so I went in and named the ranges but it produced the same "#REF!" error when I ran the macro.
 
Upvote 0
It was just a quick thought...
 
Upvote 0

Forum statistics

Threads
1,224,299
Messages
6,177,754
Members
452,798
Latest member
mlance617

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