简体   繁体   中英

Paste entire column using as target a single cell which is not in the first row

Is it really impossible to paste an entire column of data if the cells selected are not in the first row ?

I always get the error below if I try it

The information cannot be pasted because the Copy area and the paste area are not the same size and shape...

Any form of help is deeply appreciated.

It is actually impossible, either in VBA or directly. And it would not make any sense.

You could select an entire column less the last cell (last row), eg, A1:A[last row - 1] . Copy that range, and paste into, eg, B2 . That would work.

As a generalization, you could select A1:A[last row - n] . Copy that range, and paste into B[n+1] .

This will probably perform the action you mean, and you could easily write code for that.

For copy choose a cell and End key then Shift + Down key to select a contigous column.

Then to paste choose a single cell.

You can record this with Macro Recorder (Alt + T, M, R).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM