Hello!
How can I:
1. Save a copy of a whole workbook with only text (removing all formulas).
2. Keep the original file intact with all formulas.
Thanks!
Hello!
How can I:
1. Save a copy of a whole workbook with only text (removing all formulas).
2. Keep the original file intact with all formulas.
Thanks!
Last edited by Voluntas; 07-05-2022 at 04:11 AM.
I can only think of a VBA soloution for this.
This will take your current workbook, convert all the Formulas to their values and then save it as another Workbook with a "No formulas" suffix on the end so the original Workbook will still exist.
Please Login or Register to view this content.
You could cop/paste values before you save?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Thanks for your reply!
For some reason, the document freezes when I run the code though.
Your original question was How can I make a copy of a whole workbook, saving everything except the formulas?
.
So copy pasting everything then save as would do the trick.
No?
You can set formulae to be hidden, which might better suit your purposes.
I agree - your opening post and title do not hint at the need for the formulae to continue to be active, which makes it an entirely different proposition.
Administrative Note:
Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
My code works on a test file that I created of 3 Worksheets with some basic formulas thrown in.
It basically takes the current Workbook, copies and pastes all the sheets as values and then saves it as a copy of the Original with a suffix so you can easily identify it and distrubute it without any links to other workbooks etc.
The original workbook you run the code in will still have the Formulas so it can be updated.
Not sure why it would freeze anything up though, the only thing I can think of is that you've run it in a Macro enabled Workbook (.xlsm) when I'm trying to save it as a normal (.xlsx) file, though I'd expect an error and not a freeze.
Anyways, this should account for that;
If that still doesn't work and if my soloution seems like something you could work with then post a sample of your Workbook as per the instructions on the top Yellow Bar above and we can go from there.Please Login or Register to view this content.
@AliGW
Yes, I also agree! I have updated the question (and information about my version of Excel - 365 version 2205). Sorry about that.
Last edited by AliGW; 07-05-2022 at 04:33 AM. Reason: PLEASE don't quote unnecessarily!
@PaulSP8
I tried on new workbook, worked fine. Thanks! The only problem I need to solve is how to keep the formulas in the original file (I have updated my original question to reflect that need - sorry about that).
Last edited by AliGW; 07-05-2022 at 04:33 AM. Reason: PLEASE don't quote unnecessarily!
The formulas should be in the original file?
The code saves the Workbook as a copy leaving the original intact?
Yes, the original workbook should still have the formulas. The copy should have no formulas, only the values from the formulas from the original file.
Last edited by AliGW; 07-05-2022 at 05:50 AM. Reason: PLEASE don't quote unnecessarily!
Administrative Note:
Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter and rarely necessary.
If you are responding out of sequence, it is usually enough just to mention the helper's user name (e.g @AliGW).
If you do need to quote, limit the quoted section just to the section to which you wish to draw your helper's attention or a direct question to which you wish to respond.
For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.
I'm confused, that's what my code is doing.
I've attached a sample workbook.
Download it to a folder on your PC.
Run the Voluntas Macro.
You'll then have two workbooks in that folder - "Voluntas.xlsm" and "Voluntas No Formulas.xlsx"
"Voluntas" will have formulas, the other won't.
Thanks for your help guys!
I tried the macro and the formulas convert to text for both "Voluntas.xlsm" and "Voluntas No Formulas.xlsx".
Then, that's odd. I've tried it in both Excel 2013 and 2021 and it works.
I don't understand how "Voluntas.xlsm" is getting converted to text, as soon as it's 'saved as' "Voluntas No Formulas.xlsx" then "Voluntas.xlsm" should be forgotten entirely, there is nothing there that should save any changes to that Workbook
It shouldn't even be left open when the code has finished to give an option to manually save changes.
Sorry, but I'm at a loss now and I've no way of testing it on 365 to see if I can find anything that way.
Hopefully someone else can come along and see what the differences could be.
Thanks for your help anyway! This forum is amazing!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks