problem with setting up sheets

danmen

Board Regular
Joined
Jan 15, 2009
Messages
217
My workbook contains two sheets, A and B.

Depending on the values I type in sheet A, cell A1 of sheet B may change. If it does change I would like a macro to be executed that affects values in sheet B only, while I remain in A typing in new values

Can someone show me how to set this up?

thanks for any help
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this: right click Sheet B's tab, select View Code and paste in

Rich (BB code):
Private Sub Worksheet_Calculate()
Static OldVal
If Range("A1").Value <> OldVal Then
    OldVal = Range("A1").Value
    Application.EnableEvents = False
    Call MyMacro
    Application.EnableEvents = True
End If
End Sub

Change MyMacro to the name of the macro you want to run.
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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