Button to copy formulas

B

Brian Thomas

Hello,

I have a worksheet with several cells containing formulas which on occasion
the user needs to overwrite. The formula basicly says use the value of the
cell above it which is the case most of the time but in some cases its
different and the user enters the correct value instead.

I was thinking of having a button that when pressed copied the original
formulas from a range of cells elsewhere and put them back over top of the
ones they changed. How would I do this?

I am aware of the dragging procedure to get the formulas back from the cells
below or above By the way, I specifically want a "reset" button for other
users though.

Example

a b c
1 bob smith canada
2 joe =b1 =c1
3 kevin =b2 =c2
4 mary JONES =c3
5 John =b4 =c4

As you can see cell b4 was changed by the user to Jones.
 
J

Jacob Skaria

Try the below macro which will rest the formulas in Column B and C. Adjust to
suit..

Sub Macro()
Dim lngRow As Long
lngRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("B2:C" & lngRow).Formula = "=B1"
End Sub

If this post helps click Yes
 

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