downrightcynical
New Member
- Joined
- Mar 28, 2022
- Messages
- 3
- Office Version
- 365
- 2021
- Platform
- Windows
Hello all! I am a new user here hoping to resolve a slight issue I am having with VBA...
I am trying to use a simple button function to send filtered out rows to another sheet by way of VBA.
I have managed to accomplish copying over the entire row, but I need to add a slight twist. Instead of copying the entire row, I would like to only copy a specific column from the source row and paste that columns data into a predetermined column in the end sheet then repeat this process for the rest of the data in the source row(s). The reason why I want to do it this way is because the format of the two sheets is drastically different and I must specify column by column where the data is going to go, copying the whole row simply will not work for handling the data.
The code I am working with now appears like so:
I am using the offset function to prevent the sheet from copying the source header.
Thank you!
I am trying to use a simple button function to send filtered out rows to another sheet by way of VBA.
I have managed to accomplish copying over the entire row, but I need to add a slight twist. Instead of copying the entire row, I would like to only copy a specific column from the source row and paste that columns data into a predetermined column in the end sheet then repeat this process for the rest of the data in the source row(s). The reason why I want to do it this way is because the format of the two sheets is drastically different and I must specify column by column where the data is going to go, copying the whole row simply will not work for handling the data.
The code I am working with now appears like so:
VBA Code:
iRow = sht2.Range("B" & Application.Rows.Count).End(xlUp).Row + 1
With frm
ActiveSheet.UsedRange.Offset(1, 0).SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets("screen").Cells(iRow, 1)
End With
I am using the offset function to prevent the sheet from copying the source header.
Thank you!