Only copy Column B (INCLUDING THE TITLE ROW) to the last row of data in Column A

VBAProIWish

Well-known Member
Joined
Jul 6, 2009
Messages
1,027
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I have this code below that copies Column B, but it starts in cell B2. I need it to copy the title row (Cell B1) as well.

Code:
 .Range("B2").Copy Destination:=.Range("B2:B" & .Range("A" & Rows.Count).End(xlUp).Row)



I tried this...
Code:
 .Range("B:B").Copy Destination:=.Range("B:B" & .Range("A" & Rows.Count).End(xlUp).Row)

...but it didn't work.


Does anyone know how to copy a column (including the title row; row 1) but only copy down to the last row of data in column A?

Thanks much
 
Hi My Aswer is This,

I initially said "A" and "B" for simplicity sake; I just changed the letters and all worked well. Even though the code provided by Jonmo1 worked, I still copied your code and saved it for future reference as well.

I just don't want Mail Merge to copy unnecessary blank rows of data and you have all provided me with great insight.

I would love to start giving "likes" to each of you, but I don't know how. I'm sure it's something very obvious that I just haven't seen.

Thanks again to everyone!
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Ok. Glad you have things working for you. Take care and come back to Mr. Excel next time you need help.
Hi My Aswer is This,

I initially said "A" and "B" for simplicity sake; I just changed the letters and all worked well. Even though the code provided by Jonmo1 worked, I still copied your code and saved it for future reference as well.

I just don't want Mail Merge to copy unnecessary blank rows of data and you have all provided me with great insight.

I would love to start giving "likes" to each of you, but I don't know how. I'm sure it's something very obvious that I just haven't seen.

Thanks again to everyone!
 
Upvote 0

Forum statistics

Threads
1,216,027
Messages
6,128,370
Members
449,444
Latest member
abitrandom82

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