Creating new sheet with manual formula calculation

MattH1

Board Regular
Joined
Jul 15, 2016
Messages
174
I am working with a very large set of data that has a VLOOKUP in one column (Call it column X).
I have turned formulas to manual in that document so it doesn't refresh every time I try to copy or move around the data.

I have a macro that copies over a filtered piece of this large data and moves it into a new workbook and saves it. The sample is below:

Code:
'Filters column X"
        ActiveSheet.Range("$A1:$Y" & RowCount).AutoFilter Field:=24, Criteria1:= _
        "Criteria1"
'Copies over the data (values only) into a new workbook
        Dim NewWB As Excel.Workbook
        Dim rng As Excel.Range
        
        Set NewWB = Workbooks.Add
        
        Application.DisplayAlerts = False
        NewWB.SaveAs Filename:="FOLDER\NAME" & Format(Date, "yyyymmdd") & ".xlsx", FileFormat:=xlNormal, CreateBackup:=False
        Application.DisplayAlerts = True
        Set rng = ThisWorkbook.Worksheets("TabName").Cells.SpecialCells(xlCellTypeVisible)
        rng.Copy
        NewWB.Worksheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False

Somewhere in these steps it starts giving me a "Calculating" message, which seemed to start only when I tried saving the new document (it doesn't take calculate anything when I edit out the saving as a workbook.)

What would be the proper command to set the CURRENT document to Manual updating (and not recalculating before saving) and then setting it back? Also, how would I do that to the NEW document (even though there should be no formulas since it pastes values)?

Any help is appreciated, thank you!
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Watch MrExcel Video

Forum statistics

Threads
1,123,110
Messages
5,599,773
Members
414,336
Latest member
Nicolas2465

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