ahuang3433
New Member
- Joined
- Jan 24, 2017
- Messages
- 39
I have this code where I use an input box to input data to first empty cell in Column A. After the data is input into the cell, I want to use Column "E" as my last row reference point to copy and paste the value I've input in Column A to the last row based on Column "E" reference. Current code only copy from A51:A52 but I need it to copy from A51:A56. This range can vary based on data.
VBA Code:
ActiveSheet.Range("A1").End(xlDown).Offset(1, 0) = InputBox("Enter ESR#", "InputBox Example")
Dim lastRow As Long
lastRow = Range("E" & Rows.count).End(xlDown).Row
Range("A1").End(xlDown).Copy Destination:=Range("A" & lastRow).End(xlUp).Offset(1, 0)