Jennifer Van
New Member
- Joined
- Apr 22, 2022
- Messages
- 41
- Office Version
- 2016
- Platform
- Windows
Hi
I have this code, which works fantastically, but since getting help on it, I have had to add some columns so the data previously was copied in columns j,k,l,m into Equipment Library Sheet, now I need then to be copied into columns u,v,w,x columns into Equipment Library Sheet.
Also whilst I have no trouble double clicking column 13 in the Loan Request Return Sheet to action the above, is there a way to do it while text is being inputted into the cells on this sheet in columns v,w,x,y?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(13)) Is Nothing And Target.Row >= 5 Then
Dim Sval As Range, wsEL As Worksheet, wsLRR As Worksheet
Set wsLRR = Sheets("Loan Request Return")
Set wsEL = Sheets("Equipment Library")
Set Sval = wsEL.Columns("c:c").Find(Target.Value)
If Target.Value = Sval.Value Then
Target.Offset(, 9).Resize(, 4).Copy Sval.Offset(, 7)
End If
End If
End Sub
I have this code, which works fantastically, but since getting help on it, I have had to add some columns so the data previously was copied in columns j,k,l,m into Equipment Library Sheet, now I need then to be copied into columns u,v,w,x columns into Equipment Library Sheet.
Also whilst I have no trouble double clicking column 13 in the Loan Request Return Sheet to action the above, is there a way to do it while text is being inputted into the cells on this sheet in columns v,w,x,y?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(13)) Is Nothing And Target.Row >= 5 Then
Dim Sval As Range, wsEL As Worksheet, wsLRR As Worksheet
Set wsLRR = Sheets("Loan Request Return")
Set wsEL = Sheets("Equipment Library")
Set Sval = wsEL.Columns("c:c").Find(Target.Value)
If Target.Value = Sval.Value Then
Target.Offset(, 9).Resize(, 4).Copy Sval.Offset(, 7)
End If
End If
End Sub