VBA For New Column, moving right, saving previous value

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
So this I believe is difficult. Difficult just to explain.

I'm looking to take a column and make each cell equal to values from throughout the workbook. (C1=worksheet.B1) etc...

Then this file will be saved, next week, the sheet is reopened and I want to copy the formulas to a new column... Column D, and it grabs new values of (D1=worksheet.B1)....

Each week the column moves and new values are saved in the corresponding column.

Add a column, grab values, save values permanently, then run it again, and it adds a column, gets the new values, saves them permanently.

Currently, I have two separate spreadsheets. I update the values, save as a unique sheet, then open the sheet which contains the below... I then copy and paste to the right, and edit the file name slightly to point to the new permanently saved file previously updated and saved.

Thanks in advance. I hope this can be done.

Initial Values
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]DATE of WEEK ONE[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]VALUE FROM WORKSHEET AS EQUALS FORMULA (WorksheetName.H4)[/TD]
[/TR]
[TR]
[TD]Sue[/TD]
[TD]VALUE FROM WORKSHEET AS EQUALS FORMULA (DifferentWorksheetName.H4)[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]VALUE FROM WORKSHEET AS EQUALS FORMULA (CompletelyDifferentWorksheetName.H4)[/TD]
[/TR]
</tbody>[/TABLE]

First Time Macro Runs
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]DATE OF WEEK ONE[/TD]
[TD]DATE of WEEK Two (=B1+7)[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
[TR]
[TD]Sue[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
</tbody>[/TABLE]

Second Time Macro Runs
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]DATE OF WEEK ONE[/TD]
[TD]DATE of WEEK Two (=B1+7)[/TD]
[TD]DATE OF WEEK Three (C1+7)[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA[/TD]
[TD]NEWEST VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
[TR]
[TD]Sue[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA[/TD]
[TD]NEWEST VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]VALUE OF WORKSHEET AS EQUALS FORMULA[/TD]
[TD]NEW VALUE OF WORKSHEET FORMULA

[/TD]
[TD]NEWEST VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
</tbody>[/TABLE]

****** id="cke_pastebin" style="position: absolute; top: 576px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]NEWEST VALUE OF WORKSHEET FORMULA[/TD]
[/TR]
</tbody>[/TABLE]
</body>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,955
Messages
6,175,605
Members
452,660
Latest member
Zatman

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