If you copy data from one sheet to another the formula refer back to the original sheet. Doing a ‘past special’ and copying only the data can do the trick. But if you need to do such operations for a large number of sheets a VBA macro can be handy:
Dim NewName As String
Dim nm As Name
Dim ws As Worksheet
If MsgBox("Copy specific sheets to a new workbook" & vbCr & _
"New sheets will be pasted as values, named ranges removed" _
, vbYesNo, "NewCopy") = vbNo Then Exit Sub
.ScreenUpdating = False
' Copy specific sheets
' *SET THE SHEET NAMES TO COPY BELOW*
' Array("Sheet Name", "Another sheet name", "And Another"))
' Sheet names go inside quotes, seperated by commas
On Error GoTo ErrCatcher
On Error GoTo 0
' Paste sheets as values
' Remove External Links, Hperlinks and hard-code formulas
' Make sure A1 is selected on all sheets
For Each ws In ActiveWorkbook.Worksheets
Application.CutCopyMode = False
' Remove named ranges
For Each nm In ActiveWorkbook.Names
' Input box to name new file
'NewName = InputBox("Please Specify the name of your new workbook", "New Copy")
' Save it with the NewName and in the same directory as original
NewName = ThisWorkbook.Name & "_out"
'ActiveWorkbook.SaveCopyAs ThisWorkbook.Path & "" & NewName & ".xls"
.ScreenUpdating = True
MsgBox "Specified sheets do not exist within this workbook"
This code will ask for the new file name before it closes. You can tweak the code to suit your requirement.
Incoming search terms:
- https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1825 7WK0ejUgSxAYtwN2OIq6vAs0Ans0qISGLUGbBZSXSI_DPDckVWm46hOStZipyO1U 4b0881482d29443b05821735cc4db00d0fba60d2&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme