VBA Code needed to repeat formulas

AbuFawaz

New Member
Joined
Sep 21, 2017
Messages
9
You guys have helped me in the past and I'm sure you will help me again:

So I have Sheet1 that includes a list of assets from which I generate cash flows

[TABLE="width: 385"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD] [TABLE="width: 635"]
<colgroup><col span="5"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Asset No.[/TD]
[TD]Asset Name[/TD]
[TD]Duration (Months)[/TD]
[TD]Cost[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]Asset 1[/TD]
[TD]12[/TD]
[TD] 5,000[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]Asset 2[/TD]
[TD]15[/TD]
[TD] 15,000[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]Asset 3[/TD]
[TD]10[/TD]
[TD] 4,500

[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

in Sheet2 I have a set of formulas to produce the cash flows in this range (A1:J75).

What I desperately need is for this code to be able to repeat this range of formulas for each asset on top of each other so I can use them as a database later for dashboarding purposes.

Many thanks in advance.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

On sheet 2, give a couple of examples of formulas for two assets.
 
Upvote 0
You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.

On sheet 2, give a couple of examples of formulas for two assets.


Perhaps I have made my question a bit hard, all I need is to repeat the same set of formulas in the range (A1:J75) for multiple times, like I need the same formulas to be in range (A76:J150) and then (A151:J225) and so on... lets say for 100 times or more.

 
Upvote 0
Perhaps I have made my question a bit hard, all I need is to repeat the same set of formulas in the range (A1:J75) for multiple times, like I need the same formulas to be in range (A76:J150) and then (A151:J225) and so on... lets say for 100 times or more.


I'm rather confused, if the exact same formula is going to be used in the range (A1:J225) why not just use the autofill feature for the formula? Why do you need a macro for this? Is it because there is data past the range A1:J225 that you do not want using the formula?
 
Last edited:
Upvote 0
I'm rather confused, if the exact same formula is going to be used in the range (A1:J225) why not just use the autofill feature for the formula? Why do you need a macro for this? Is it because there is data past the range A1:J225 that you do not want using the formula?


I have it figured with no macros but what I need is a macro that will repeat the same calculations of the range and output the values only not the formulas. Sorry english is not my first language so I might have asked the question in a wrong way.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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