acantor Posted April 23, 2021 Report Share Posted April 23, 2021 I track my expenses in an Excel spreadsheet. For most expenses, I pay 13% in taxes. For example, if the pre-tax value for an item is $100, I pay a total of $113. I set up my spreadsheet to accept pre-tax values. The spreadsheet uses formulas to calculate the amount of tax I paid on an item, and then sums the two: Pre-tax Tax Total 100.00 13.00 $113.00 10.00 1.30 $11.30 1.00 0.13 $1.13 Unfortunately, I accidentally inputted hundreds of expenses before realizing that I had inserted totals instead of the pre-tax amounts. The challenge: Write a macro to change the value of a cell from the post-tax amount to the pre-tax amount. For example, the macro will change a value of "113" incorrectly entered into in the Pre-Tax column to "100." Assume the cells that you want to correct only contain numbers: no text, and no formulas. This is a real challenge. I actually made this mistake last week. My macro took 10 or 15 minutes to create, and saved hours of tedium to repair. Bonus: Because there might be hundreds of these mistakes in the spreadsheet, anything your solution does to speed up the process of repairing values will earn you brownie points! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.