VBA Copy and Paste Question

WWII_Buff

Board Regular
Joined
Nov 13, 2017
Messages
88
I want to copy the contents of a range as long as the number of cells in the column have data. Starting from Column D1.

Here is my code:

Worksheets("DATASHEET").Range("D1:BD" & LastRow).Copy

However, the code is copying from A1 vs D1, any suggesting please?

Thanks.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Do you have any merged cells?
 
Upvote 0
Then that's probably the problem.
Best bet is to remove them, merged cells are a PITA & I avoid them like the plague.
If you are merging cells in a row have a look at this
 
Upvote 0
Ah! So you just taught me that there is a way to center text without merging columns! Outstanding! Thank you so much! :)
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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