# Copying Formula

#### Lubna Khan

##### New Member
How do we copy a formula when it goes this way:

d17/d2*4.38
d18/d2*4.38
d19/d2*4.38
means the first variable keeps changing,, the rest remain the same, i cant recall!!

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

#### DonkeyOte

##### MrExcel MVP
=\$D17/\$D\$2*4.38

Check out absolute and relative cell referencing in XL help.

#### Guanjin Peter

##### Active Member
assuming A1:A3

range("a1:a3").formula = "=d17"

result: =d17, =d18, =d19

range("a1:a3").formula = "=\$d\$17"
result: =d17, =d17, =d17

#### Stormseed

##### Banned
Peter, why do you want to complicate the solution to that question combining it with VBA ?

#### Guanjin Peter

##### Active Member
whoops sorry. I'll take note next time.

#### takyar

##### New Member
For the cell that changes relatively, don't do anything and for the cell that remains same just put \$ before the column and \$ before the row number.

Examle, d17/\$d\$2*4.38.

Replies
4
Views
378
Replies
1
Views
274
Replies
1
Views
1K
Replies
6
Views
356
Replies
4
Views
253

1,190,883
Messages
5,983,387
Members
439,841
Latest member
goodwillhunting

### 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.

### Which adblocker are you using?

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

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