Copy and paste or autofill from first empty row to last row in previous column

ek14497

New Member
Joined
Oct 30, 2014
Messages
6
HI Guys,

I need big help to create a paste or autofill code.

I will try my best to explain the scenario as following:

In sheet "EXT" contains data in column A to X. New Data will be added daily continuing from the last empty row of the existing Data.

For Example existing data are in A1 to X5 (in Black) then new Data are copied from a another workbook sheet "EXT" range A2 until last row of W (The number of data is different each day in this example let's say A2 to W4) and pasted in A6. (A6 to W9 in Blue)

What I need help is in Column X.
I need a code to copy the Date in the first pasted cell in Column A (in this case A6) and Paste or Autofill the same date in the first empty row in Column X until the last row of Column W. (X6 to X9)

The next day new data will be added in A10 to W... Say W 15. The code will then copy the date in Cell A10 and paste/autofill in column X10 to X 15

ABCDWX
1DATE
$
Units
Stock
Month
Creation date
26 Jan 174435January6 Jan 17
37 Jan 174335January6 Jan 17
48 Jan 179015January6 Jan 17
57 Jan 175031January7 Jan 17
68 Jan 17
20
3
4
January
8 Jan 17
78 Jan 17
22
4
5
January
8 Jan 17
89 Jan 17
30
4
5
January
8 Jan 17
99 Jan 17
55
7
5
January
8 Jan 17
10

<tbody>
</tbody>


Many thanks in advance for your help
Kanit
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Code:
    [color=darkblue]Dim[/color] StartRow [color=darkblue]As[/color] [color=darkblue]Long[/color], LastRow [color=darkblue]As[/color] [color=darkblue]Long[/color]
    [color=darkblue]With[/color] Sheets("EXT")
        StartRow = .Range("X" & Rows.Count).End(xlUp).Row + 1
        LastRow = .Range("W" & Rows.Count).End(xlUp).Row
        .Range("X" & StartRow & ":X" & LastRow).Value = .Range("A" & StartRow).Value
    [color=darkblue]End[/color] [color=darkblue]With[/color]
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

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