My Macro is copying formula’s instead of pasting values
Hi All,
I have an excel spreadsheet that I generate using data that pulls from a few different tabs within the spreadsheet.
I am trying to run a macro that copies everything in each tab as values and removes a few tabs to generate a ‘cleaned up’ version of my report.
When I run the macro, everything works as it should apart from the copy values part. Instead of just copying the cell value, the formula’s are being copied and they are trying to pull from one of the tabs I have deleted in the cleaned up version.
Please see formula I am using below:
For Each Ws In ActiveWorkbook.Worksheets
Range(“A1”).Select
Cells.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Any help would be greatly appreciated 🙂
Hi All, I have an excel spreadsheet that I generate using data that pulls from a few different tabs within the spreadsheet.I am trying to run a macro that copies everything in each tab as values and removes a few tabs to generate a ‘cleaned up’ version of my report. When I run the macro, everything works as it should apart from the copy values part. Instead of just copying the cell value, the formula’s are being copied and they are trying to pull from one of the tabs I have deleted in the cleaned up version. Please see formula I am using below: For Each Ws In ActiveWorkbook.WorksheetsRange(“A1”).SelectCells.CopySelection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _:=False, Transpose:=False Any help would be greatly appreciated 🙂 Read More