VBA Saving Data

Dannybert

New Member
Joined
Aug 22, 2021
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
I have a table to keep track of amounts and prizes. I want to use a VBA code to be able to make a button that can save the data from this week and start a new week in the row below.

This is what the table looks like now:
ProfitTable1.JPG


So after running the macro, I would like to get it to start a new row and change some stuff on the current (lowest) row. It would look like this:
ProfitTable2.JPG


So after running the macro (VBA code), it should start a new row and display the currentDate (which should stay the same after pasting it). Then it should copy the data from the first row like I displayed with the asterixes.
After completing the date for the new row, it should change the 'End Amount' and 'End Value' to only be left with the number/currency instead of the formula, because the formula is to display real-time changes. So it should be fixed after starting a new row.

The last 4 columns can be copied over directly since those calculations and formulas are relative.

Thanks already!
 
Who the heck stole my period?

oops. Yeah it works with the period.
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hey thanks for helping me out, but this code is giving me an error on 'wsMasterRange'. So it doesn't run now and I tried to change it to 'wsMaster.Range' but that didn't help ;)
@Dannybert what error did you get after inserting the period?
 
Upvote 0

Forum statistics

Threads
1,214,528
Messages
6,120,065
Members
448,942
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top