Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Worksheet link

Posted on 2011-03-07
7
Medium Priority
?
274 Views
Last Modified: 2012-05-11
Hi, i want to know how to create a link between worksheets in the same workbook.

Example: i enter 25 in the sheet1 A1, this automatically appears in sheet2 A1 and if i enter 35 in sheet2 A1 then the value in sheet1 A1 change to 35, any idea?

This cannot be done with a formula
0
Comment
Question by:joyacv2
  • 4
  • 3
7 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35056842
>>"This cannot be done with a formula"

Can I ask why not?
0
 
LVL 1

Author Comment

by:joyacv2
ID: 35056880
Because when you write in the cell A1 in the sheet 2 for example, and the cell contains a formula "=sheet1!A1", you erase the formula. The link can be done one way using a formula, but how i can do in two way. I will use this for the entire sheet. Thank you for your help!
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35056904
Oh sorry - I misread the last part of the question. You will need code for this - is that OK?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:joyacv2
ID: 35056914
Ok, no problem, perfect
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 35056996
Right-click the tab for Sheet1, choose View Code then paste this in:
Private Sub Worksheet_Change(ByVal Target As Range)
   On Error Resume Next
   Application.EnableEvents = False
   Sheets("Sheet2").Range(Target.Address).Value = Target.Value
   Application.EnableEvents = True
End Sub

Open in new window


repeat for Sheet2, but changing the Sheets("Sheet2") part to Sheets("Sheet1")
0
 
LVL 1

Author Comment

by:joyacv2
ID: 35057076
Works perfect! Exactly what i want!
0
 
LVL 1

Author Closing Comment

by:joyacv2
ID: 35057085
Excelent
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question