ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pasting data and then selecting the cells next to what was pasted. (https://www.excelbanter.com/excel-programming/389302-pasting-data-then-selecting-cells-next-what-pasted.html)

Vic[_4_]

Pasting data and then selecting the cells next to what was pasted.
 
I would like to:

Paste a variable number of contiguous cells that have been copied from
a different worksheet.
After pasting the cells I would like to select the cells in column to
the right of what was pasted. For example if I have just pasted five
cells, I would like the five cells to the right of those cells
selected. If I just pasted two cells, I would like to select the two
cells to the right.
(I will then do some formatting on those cells once selected but
although a newbie, I think I can handle that :)
)

Help appreciated,
~Vic


excelent

Pasting data and then selecting the cells next to what was pasted.
 
Sub tst()
range("A2:A5").Copy range("C3:C6")
range("C3:C6").Offset(0, 1).Select
End Sub


"Vic" skrev:

I would like to:

Paste a variable number of contiguous cells that have been copied from
a different worksheet.
After pasting the cells I would like to select the cells in column to
the right of what was pasted. For example if I have just pasted five
cells, I would like the five cells to the right of those cells
selected. If I just pasted two cells, I would like to select the two
cells to the right.
(I will then do some formatting on those cells once selected but
although a newbie, I think I can handle that :)
)

Help appreciated,
~Vic




All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com