Copy formula with vba

wikus

Active Member
Joined
May 2, 2010
Messages
320
Office Version
  1. 365
I would appreciate some help.
I have to copy a formula with vba to a certain amount of rows. The problem is the formula has cell references which must increase as the formula is copied down.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You probalby want something like:

Code:
Range("A1:A200").FormulaR1C1 = "=SUM(RC[1]:RC[5])"
It would help to know:
1. Formula you need to insert
2. Range you want it to go in
3. More details about
The problem is the formula has cell references which must increase as the formula is copied down.

Hope that helps
 
Upvote 0
The formula I am copying:
=HsSetValue($E11,$B$9,"Account#"&$D11,"Entity#"&$B$6,"Scenario#"&$B$2,"Period#"&$B$4,"Year#"&$B$3,"Value#"&$B$8,"ICP#[ICP None]","Custom1#[None]","Custom2#[None]","Custom3#[None]","Custom4#[None]","View#YTD")
When the formula is copied the reference to E11 and D11 for instance should increase to 12, 13, 14 etc when the formula is copied
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

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