I am trying to use the private sub worksheet_change(byval target as range) function, but I am having trouble with it.
I have my set up as follows:
A1 B1 C1 D1 E1 (where I want E1 to equal A1 or B1 or C1 or D1)
A2 B2 C2 D2 E2 (where I want E2 to equal A2 or B2 or C2 or D2)
A3 B3 C3 D3 E3 (where I want E3 to equal A3 or B3 or C3 or D2)
I want to be able to select A1, B1, C1, or D1 by double clicking that cell so it shows up in E1, but NOT in E2 or E3, but my code makes it so that E1, E2, AND E3 become whatever cell I click. The code is currently written as:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("E1", E3 ).Value = ActiveCell.Value
End Sub
HOW SHOULD I CHANGE THIS CODE TO GET IT TO RUN THE WAY I WANT IT TO? Thank you in advance for the support.
Bookmarks