Jennifer Van
New Member
- Joined
- Apr 22, 2022
- Messages
- 41
- Office Version
- 2016
- Platform
- Windows
Hi
I had help with this VBA and it was working until I added columns and tried to fix it up myself but seemed to have mucked it up.
My worksheet "Loan Request Return" puts data on a row and in column U an identifying Unique ID Number is placed and in columns AA, AB,AC is placed current status of the equipment.
I need this information from rows AA,AB,AC to be placed into worksheet "Equipment Library" - however not just on a blank row - finding the matching identifying Unique ID Number from column U in the "Loan Request Return" worksheet.
The Unique ID Number is located in column D of the "Equipment Library" worksheet and the columns AA,AB,AC need to go into columns V,W,X on the "Equipment Library" worksheet.
Can someone help adjust this code please?
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(21)) 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(, 5).Resize(, 3).Copy Sval.Offset(, 17)
End If
End If
End Sub
I had help with this VBA and it was working until I added columns and tried to fix it up myself but seemed to have mucked it up.
My worksheet "Loan Request Return" puts data on a row and in column U an identifying Unique ID Number is placed and in columns AA, AB,AC is placed current status of the equipment.
I need this information from rows AA,AB,AC to be placed into worksheet "Equipment Library" - however not just on a blank row - finding the matching identifying Unique ID Number from column U in the "Loan Request Return" worksheet.
The Unique ID Number is located in column D of the "Equipment Library" worksheet and the columns AA,AB,AC need to go into columns V,W,X on the "Equipment Library" worksheet.
Can someone help adjust this code please?
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(21)) 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(, 5).Resize(, 3).Copy Sval.Offset(, 17)
End If
End If
End Sub