Using VBA to copy across columns until a date is reached

jaspermowatt

New Member
Joined
Apr 7, 2018
Messages
10
Hello all,

I am trying to create a dynamic cash flow model where I can type in a start and end date, and run the macro, and the the CFM is auto populated i.e. columns are dragged out until the end date is reached.

I have attached an image of a simplified example.

In my head it seems simple, but I am pretty new to the world of macros and I am struggling to make progress. Any help or guidance would be greatly appreciated. Thank you in advance.

J
 

Attachments

  • Screenshot 2020-05-30 at 11.03.23.png
    Screenshot 2020-05-30 at 11.03.23.png
    30.9 KB · Views: 19
Hopefully this method should work for every type of button - if not then let me know which type of button

The name must be acceptable to Excel otherwise it is rejected
-eg no spaces if it's active-x command button

Rename button.jpg


You may need to reassign the macro after re-naming the button
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hopefully this method should work for every type of button - if not then let me know which type of button

The name must be acceptable to Excel otherwise it is rejected
-eg no spaces if it's active-x command button



You may need to reassign the macro after re-naming the button

My developer tab doesn't look like that, is may be because I am on a mac using office 365?
 

Attachments

  • Screenshot 2020-06-03 at 10.02.21.png
    Screenshot 2020-06-03 at 10.02.21.png
    30.5 KB · Views: 3
Upvote 0
Just a thought
- is it the button caption that you want to change ?

Right click on Forms Control button \ edit text

button text.jpg


Active-X
Select design mode \ Right-click on command button \ properties \ amend caption property \ deselect design mode
button caption.jpg
 
Upvote 0
My developer tab doesn't look like that, is may be because I am on a mac using office 365?
Sorry cannot help
Start a NEW thread and ask the question there and include "mac" in the title
Make it clear wanting amend the caption or rename the object
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,862
Members
449,052
Latest member
Fuddy_Duddy

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