Tresor
New Member
- Joined
- Dec 21, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hello everyone!
Hope you are great.
I am trying (with no success) to filter for a specific value in a table and replace the column number 4 with the data in a differen sheet. I copy all the data in the first row and I don´t know how to paste it in the specific row. The code that I am using is the following:
All the help will be apreciate.
Thanks!
Hope you are great.
I am trying (with no success) to filter for a specific value in a table and replace the column number 4 with the data in a differen sheet. I copy all the data in the first row and I don´t know how to paste it in the specific row. The code that I am using is the following:
VBA Code:
Sub copia()
Application.ScreenUpdating = False
Dim hotel As String
hotel = ActiveSheet.Name
Sheets("discounts").Select
ActiveSheet.ListObjects("discount").Range.AutoFilter Field:=1, Criteria1:=hotel
Sheets(hotel).Select
Range("d43:d50").Select
Selection.Copy
Sheets("discounts").Select
ActiveSheet.ListObjects("discount").ListColumns(4).Range.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets(hotel).Select
Range("L33").Select
Application.CutCopyMode = False
End Sub
All the help will be apreciate.
Thanks!