Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select or Copy three 3 non-adjacent cells

How can I copy 3 non-adjacent cells using ActiveCell.Row?

Range("A" & ActiveCell.Row, "C" & ActiveCell.Row, "E" & ActiveCell.Row).Copy

Update: For further info follow - https://youtu.be/zjF7oLLgtms

like image 218
Ibn e Ashiq Avatar asked Sep 24 '19 07:09

Ibn e Ashiq


2 Answers

To simplify things a little:

Range(Replace("A?,C?,E?", "?", ActiveCell.Row)).Copy
like image 197
JvdV Avatar answered Oct 04 '22 21:10

JvdV


You have the , outside the "". You need to put them inside. See this

Range("A" & ActiveCell.Row & ",C" & ActiveCell.Row & ",E" & ActiveCell.Row).Copy
like image 35
Siddharth Rout Avatar answered Oct 04 '22 21:10

Siddharth Rout