Copy/Paste Values based on different criteria using a VBA

Trains R Us

New Member
Joined
Nov 13, 2017
Messages
1
Hoping someone can help with some good VBA code.

Situation: I have three columns: This Period. Last Period Cumulative. This Period Cumulative. I have set up my spreadsheet so that the user will only need to input "This Period" values. However, I want the spreadsheet to automatically update the Last Period Cumulative column. I was hoping someone could help with a VBA to solve this. Also, the user may submit once per month, but at any time during a certain month.

Possible solution: Copy values based on a dated cell being within a date range (Begin/End of Month) in worksheet 1 and paste the values (values only) into worksheet 2 based on a corresponding monthly column. Then I can put a conditional formula in the "Last Period Cumulative" column that calculates based on the last monthly submission data that will be in worksheet 2.

Why: This could be easily done by manually transferring the "This Period Cumulative" from the previous workbook to the current workbook's "Last Period Cumulative" column. However, Given a number of line items, the complexity of worksheets, and human error, I'd like to use math instead of humans for calculating to reduce errors.

Thanks in advance Excel Geniuses.

Best.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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