copy and paste a row but not the entire row just between A:J

Gwhaou

Board Regular
Joined
May 10, 2022
Messages
78
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello,

I'm trying to copy and paste row value, by knowing if there is data or not, actually i'm using this code :

VBA Code:
Sheets("Data_Sheet").Range("A" & i).EntireRow.Copy Destination:=Sheets("Data_transfert").Range("A" & Rows.Count).End(xlUp).Offset(1)

The i variable here is for the condition "For" and "Next" line.

Actually it works but it copies the actual entire row, but I just want that to copy row between column A to J.

I tried that but it's not working :cry:

VBA Code:
Sheets("Data_Sheet").Range("A & i:J & i").EntireRow.Copy Destination:=Sheets("Data_transfert").Range("A" & Rows.Count).End(xlUp).Offset(1)

I will appreciate your help🙏
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about
VBA Code:
Sheets("Data_Sheet").Range("A" & i).Resize(,10).Copy Destination:=Sheets("Data_transfert").Range("A" & Rows.Count).End(xlUp).Offset(1)
 
Upvote 0
Solution
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

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