Yet another one right over the plate

Roccofan

Board Regular
Joined
Apr 18, 2002
Messages
61
My ultimate goal with this code is to prevent a circular reference by having the data in a cell on sheet 1 copied (using "Paste Values") to sheet 2. I need this done if/when the data on sheet one changes. I recorded a macro that I have to execute manually. I need to make it so that this is an automatic event when the data on sheet 1 changes:

Sub RiggsInterest()
Sheets("Payoff Calculation-BOA").Activate
Range("F4").Select
Selection.Copy
Sheets("Master Budget").Activate
Range("A45").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

Thanks in advance.
 
GOT IT!!!

The following code worked:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$14" Then
Sheets("Sheet1").Activate
Sheets("Sheet 1").Range("F4").Select
Selection.Copy
Sheets("Sheet 2").Activate
Sheets("Sheet 2").Range("A45").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End Sub

Thanks to Lenze and KniteMare for all the help.

RF
This message was edited by Roccofan on 2002-08-27 11:32
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Then also DIRECTLY reference that cell by changing the associated line to:

Sheets("Sheet1").Activate
Sheets("Sheet1").Range("F4").Select

Yours in EXCELent Frustration

KniteMare

If it was easy then everybody would be doing it.
 
Upvote 0

Forum statistics

Threads
1,222,903
Messages
6,168,939
Members
452,227
Latest member
sam1121

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