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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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,223,715
Messages
6,174,065
Members
452,542
Latest member
Bricklin

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