Copy a column till the last row value of another column

Zink

New Member
Joined
Jun 11, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello Everyone

I have a list of values in column A, starting from A2.
I also have a list of values in column E, also starting E2. This list is longer than the list in column A.

I want to copy and paste(special) values from column E in column F, but only as many rows as there are rows in column A.

Example.
A has 300 Rows. E has 600 Rows.

I want to copy paste E2:E300 (since last row in A is 300) to column F.



So far, I have only able to use the following code snippet to find the last row is column A

VBA Code:
Dim LastRow as Long
With ThisWorkbook.Sheets("Sheetname")
    LastRow = .Cells(Rows.Count, 1).End(xlUp).row 
End With

I have tried using other people's examples code from google search, but all of it is becoming a mess, or is going for too many steps to achieve this.
This should be very simple, but since I am complete noob, I am not able to make it work.

Please help, and please give explanations for each step so that I understand and learn.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi & welcome to MrExcel.
How about
VBA Code:
Sub Zink()
   With Sheets("Sheet1")
      With .Range("E2:E" & .Range("A" & Rows.Count).End(xlUp).Row)
         .Offset(, 1).Value = .Value
      End With
   End With
End Sub
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top