Usually_Wrong
New Member
- Joined
- Oct 6, 2021
- Messages
- 4
- Office Version
-
- 365
- Platform
-
- Windows
- Web
Hello!
So I'm hoping to do a couple of things on this workbook. I'm going to try and be as clear as I can, but please bear with me.
Task #1: Copy a specific column and paste it at the very bottom of the table. In this scenario, the first column I'd like to do this with is Column A. Copy paste values from column A and add it to the very bottom of the table - still located in column A.
Finished product once the macro is run -
Task #2: Do the same thing for columns C and E.
At this point, this is where I'm drawing a blank. I would like to copy the data from Column C, paste it under C11, and do the same for column E. However, if I use the formula from above, it makes it so that the copied values on column C are instead pasted on C20, the last available row - column E's copied data would then be pasted after the column C data.
I tried to search for solutions, but I don't believe I've come across it just yet.
The hope is I get a final product like this -
So I'm hoping to do a couple of things on this workbook. I'm going to try and be as clear as I can, but please bear with me.
Task #1: Copy a specific column and paste it at the very bottom of the table. In this scenario, the first column I'd like to do this with is Column A. Copy paste values from column A and add it to the very bottom of the table - still located in column A.
VBA Code:
Sub CopyPaste()
Range("Table1[Employee ID]").Copy
Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End Sub
Finished product once the macro is run -
Task #2: Do the same thing for columns C and E.
At this point, this is where I'm drawing a blank. I would like to copy the data from Column C, paste it under C11, and do the same for column E. However, if I use the formula from above, it makes it so that the copied values on column C are instead pasted on C20, the last available row - column E's copied data would then be pasted after the column C data.
I tried to search for solutions, but I don't believe I've come across it just yet.
The hope is I get a final product like this -