Copy Pasting formula's

B

Ben

I know that in Excel you can have a cell equal the value
of another cell is there a way you can set a cell's
formula to equal another cell's so that when you chang
the formula in the 'master cell' it will update all the
cells with there proper references?

Example say cell
C1 = A1+B1
C2 = A2+B2
C3 = A3+B3
C4 = A4+B4
C5 = A5+B5

I know the contents the formula in C1 can be copied and
pasted into C2:C5 but how do you set it up so that the
when you change the formula in C1 it changes the formula
in C2:C5 example:

Change C1 = A1-B1+D4

Auto Changes
C2 = A2-B2+D5
C3 = A3-B3+D6
C4 = A4-B4+D7
C5 = A5-B5+D7

Thanks,
Ben
 
D

Don Guillett

right click on sheet tab>view code>insert this>save workbook
if you know the range then comment out or delete
x = Range("c" & Rows.Count).End(xlUp).Row
and change
Range("c1:c" & x).FillDown
to
Range("c1:c5).FillDown
--------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
x = Range("c" & Rows.Count).End(xlUp).Row
Range("c1:c" & x).FillDown
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top