I have a budgeting worksheet that contains multiple sheets and formulas. A user can enter his data into the ledger, and various financial scenarios are automatically calculated. The ledger contains some cells that contain formulas, and may be over-written by the user. That is fine since the worksheet is projecting month per month, and must be updated with actual entries to keep the projections accurate.
Occasionally I update/upgrade the budgeting worksheet, and want the user to be able to export his data from the old worksheet and import it to the new worksheet. I have created a macro that exports the data for certain ranges. I have also created a macro that imports the data range to the new worksheet.
However, my problem is that the macro to export also converts predetermined calculations from their original formula (=A1+B2, for example) to whatever the result is for that formula ($1,200, for example). This causes problems for future projections in other data ranges since the formula is now replaced with a static number that cannot change based upon other monthly deposits/withdrawals.
I have tried exporting the data minus any cells that contain formulas but have been unsuccessful. I have attached my working export code (as I have many sheets and ranges, I have only posted the minimum to show what I have working). I have also attached the code I used for ignoring cells with formulas (inspired by this post Excel VBA Copy / Paste macro: Ignore cells with Formulas). Any help is greatly appreciated. As is surely obvious, I am new to VBA and know next to nothing about it!
WORKING EXPORT CODE:
NON-WORKING: IGNORE CELLS WITH FORMULAPlease Login or Register to view this content.
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzerPlease Login or Register to view this content.
Bookmarks