PC Review


Reply
Thread Tools Rate Thread

Button to copy formulas

 
 
Brian Thomas
Guest
Posts: n/a
 
      24th Aug 2009
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.
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      24th Aug 2009
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
---------------
Jacob Skaria


"Brian Thomas" wrote:

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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Row *below* button position - no need to copy formulas =?Utf-8?B?S2F0aWU=?= Microsoft Excel Programming 1 20th Sep 2007 11:48 PM
automatically copy formulas down columns or copy formulas all the =?Utf-8?B?SG93bGluZ0JsdWU=?= Microsoft Excel Worksheet Functions 1 16th Mar 2007 11:11 PM
copy formulas from a contiguous range to a safe place and copy them back later Lucas Budlong Microsoft Excel Programming 2 22nd Feb 2006 08:26 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Microsoft Excel Programming 1 21st Aug 2003 07:04 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Microsoft Excel Worksheet Functions 1 21st Aug 2003 07:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 PM.