looping columns with data

bks35

New Member
Joined
Jun 14, 2011
Messages
1
I'm a newbie to vba and I'm trying to write a macro where I select all the columns from column E on that have data and copy them into another workbook. So far I've got column E to copy and paste but I want to make a loop to check how many columns have data so that I'm not hardcoding the columns in. I think I need a Do While loop and to use offset but I'm not sure how to start this. Any help would be appreciated!!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I'm a newbie to vba and I'm trying to write a macro where I select all the columns from column E on that have data and copy them into another workbook. So far I've got column E to copy and paste but I want to make a loop to check how many columns have data so that I'm not hardcoding the columns in. I think I need a Do While loop and to use offset but I'm not sure how to start this. Any help would be appreciated!!

A good idea would be to post the code that you already have. Then I'm sure alot of members on the board would be eager to help you.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

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