Export data to Excel workbook, make a copy, then copy and paste values in Excel

Not sure if this is possible.  I have a report that is updated daily (Sales File #1).  When updated, old data is replaced by new data each morning via an MS ACCESS Macro.
Sheet 1:  Contains data with calculations, vlookups, etc.
Sheet 2:  Contains about 3000 rows of data that are exported each morning. Once exported, data in Sheet 1 automatically update.

Now the Sales department wants me to create a copy (Sales File # 2), copy and paste values on sheet 1. When updated, old data is replaced by new data each morning.  They do not want me to include the raw data from sheet 2.

Purpose is to reduce file size, this report was converted to PDF and emailed each day.  Now they want to be able to filter data and play with the numbers.  Therefore are requesting the actual excel file in lieu of the PDF file.

Is this possible?  What are the chances of the file corrupting each day?
gracie1972Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThomasMcA2Commented:
A worksheet can be copied to another workbook with a single command:
currentSheet.Copy Before:=Workbooks("Sales File # 2").Sheets(sheetIndex)

Open in new window

0
Roy CoxGroup Finance ManagerCommented:
Is this what you want?

Option Explicit

Sub MakeCopy()
    Dim TempSht As Worksheet
    Set TempSht = Sheets.Add
    '/// Convert to Values
    ActiveSheet.Cells.Select
    Selection.Copy
    Selection.PasteSpecial xlValues
    ActiveSheet.Name = Format(Date, "dd_mmmm_yyyy")
    'create report to email
    ActiveSheet.Move
    ActiveWorkbook.SaveAs "Sales File " & Format(Date, "dd_mmmm_yyyy"), FileFormat:=51, CreateBackup:=False
    '/// this line will clear data from the original file leaving header row
    '/// header row assumed to be in Row 1
    ThisWorkbook.Sheets(1).Range("A1").Offset(1).CurrentRegion.ClearContents

End Sub

Open in new window


You can add code to automatically email the report
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.