Question:
How can I update a cell from another worksheet in Excel?
Person
2013-03-05 23:24:14 UTC
I am often working on excel workbooks that have multiple worksheets, and I'm constantly having to flick between sheets when changing values to see how it effects other values. For example I'l have one sheet which includes the dimensions of a product and cost, and another worksheet which calculates the properties of this product. Now, is it possible to create a workbook where I can have the dimensions and cost on one worksheet, and the dimensions and properties on another worksheet, and when I update the dimensions on one of the worksheets it updates the corresponding dimension in the other worksheet and vice versa? Kind of like "linking" the cells.

I know I could just use = Sheet2!C8 but this would mean I could only update the dimensions from one worksheet and I would still have to keep clicking back and forth. I need a way for the values to be able to be edited in either worksheet, and then update in the second worksheet.

Thanks!
Three answers:
garbo7441
2013-03-06 06:58:52 UTC
Edit: it would then seem that you wish to link cells B1:B7 in Sheet1 and Sheet2 so that if any cell in either sheet is changed, the corresponding cell in the linked sheet would change to the new value. If so, you can do as you wish using the two following event handlers:



Copy the first event handler to the clipboard (highlight the entire code, right click inside the highlighted area, and 'Copy'):



Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Range("B1:B7"), Range(Target.Address)) Is Nothing Then

Sheets("Sheet2").Range(Target. Address).Value = Target.Value

End If

End Sub



Select Sheet1 and right click the sheet tab at the bottom.



Select 'View Code'.



Paste the event handler into the white editing area to the right (right click inside the area and 'Paste').



Then, copy the following event handler to the clipboard:



Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Range("B1:B7"), Range(Target.Address)) Is Nothing Then

Sheets("Sheet1").Range(Target. Address).Value = Target.Value

End If

End Sub



Select Sheet2 and right click the sheet tab at the bottom.



Select 'View Code' and paste it into the white editing area to the right, as you did with the first event handler.



Close the VBE (red button w/white 'x' - top right).



Change any value in range B1:B7 in sheet1 and the corresponding cell in Sheet2 will return the same value. Select Sheet2 and change the value in the cell previously selected. The corresponding cell in Sheet1 will now return that value.



Advise if additional modifications are required, or if I missed the point entirely.



============================================







You can do this using VBA fairly easily. I infer you have more than one set of 'linked cells'. Can you provide a list of each set, as well as the sheet names for each component of the set?
roza
2016-11-30 07:41:46 UTC
whats up in Worksheet 2 you are able to in basic terms type into the cellular = then click on worksheet a million and the cellular C1 What it would want to seem as if contained in the formula in Worksheet 2 is =Worksheet1!C1 this can then replace each and every time the reply in Worksheet a million cellular C1 transformations. desire this facilitates!
Vilas
2013-03-05 23:43:28 UTC
yes you can, but if you sent any one workbook from them on another computer then end user will face problem to understood, best way is do all things in one work book,



i want to see these both work books, share your sheets with me on facebook group or my wall



www.facebook.com/vilasshende

or

Education Mission i.e.

https://www.facebook.com/#!/groups/114967918660251/


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...