Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Worksheet link (not complete worksheet)

Posted on 2011-03-07
7
Medium Priority
?
313 Views
Last Modified: 2012-08-14
how i do the link, but only with the cells that i want and not my entire worksheet? I use the code from Rorya in my past question and works perfect!


This is my past Question:
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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35057418
What are the cells you want?
0
 
LVL 1

Author Comment

by:joyacv2
ID: 35057499
For example, A1 and D2
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 35057536
Then you want something like:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngCell as range
if not intersect(target, range("A1,D2")) is nothing then
   On Error Resume Next
   Application.EnableEvents = False
   for each rngCell in intersect(target, range("A1,D2"))
   Sheets("Sheet2").Range(rngcell.Address).Value = rngcell.Value
   next rngcell
   Application.EnableEvents = True
end if
End Sub

Open in new window


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 19

Expert Comment

by:Arno Koster
ID: 35057554
to acieve the results as in the example, take these steps :

1) goto the cell A1 in sheet2
2) enter the following contents :

=sheet1!A1

3) press enter

done

If you want to do this for 10 by 10 cells, you can either

    perform this manually cell by cell on sheet2,

    or select the A1 cell on sheet2, hover the mouse cursor above the black dot on the lower right corner of the cell (mouse cursos should now be a 'plus' sign)
    drag the mouse cursor to a range holding all the cells where you want this functionality.
    Note that when you drag the mouse to the right, eg. to cell B1, this cell also links to cell B1 in sheet1 !
0
 
LVL 1

Author Comment

by:joyacv2
ID: 35057572
This will work for many cells, like a3, D5, c7, ect?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35057581
Yes, as long as the total cell address is under 255 characters. If it's more than that then you would need to build up the range using Union (or rethink what you are doing! ;))
0
 
LVL 1

Author Closing Comment

by:joyacv2
ID: 35057593
Excelent!
0

Featured Post

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.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

610 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