Use the worksheet change event in the sheet so
VB:If target.address = "$A$2" Then Range("b2").value = Range("a2").value End If
I'm trying to figure out how the return the contents of another cell. For example, I want cell B2 to reflect the contents of cell A1 such that if the spreadsheet user changes the contents of cell A1, it show up in B2 as well, and I need to set this up using VBA.
In excel, if I type "=A1" into cell B2, then whenever the contents of cell A1 is changed by the spreadsheet user, the contents of cell B2 automatically changes as well without running my VBA macro again.
Using VBA, if I do: cell(B2) = cell(A1)
cell B2 contains the contents of cell A1, but if the user changes the contents of cell A1, cell B2 does not update to reflect that automatically.
Thanks for any help you can offer,
Steve
Use the worksheet change event in the sheet so
VB:If target.address = "$A$2" Then Range("b2").value = Range("a2").value End If
Thanks, I wasn't familiar with worksheet change events, but I read up on it and think that will do I need. Thanks very much for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks