Copy Formulas Automatically

tony_d

Board Regular
Joined
Sep 27, 2003
Messages
229
Is it possible to copy a formula from cell C2 and paste it in C3 if a number is put in cell A2
This then needs to do the same if a value is put in A3 again copy & paste the formula one cell down.

I know I can just do it manually by dragging the formulas down but this way it neatens things up.


Thanks in advance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Do something like this

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
        Set A_Rng = Range("A" & i)
        Set C_Rng = Range("C" & i)
 
        C_Rng.Value = A_Rng * 2
    Next
End Sub

Modify the ranges and formulas to suits your need.
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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