Copy Specific Columns to Another Sheet

stereojam77

New Member
Joined
Aug 6, 2010
Messages
2
Hi all,

I just started learning about Macro yesterday so bear with me. I need to create a maco that will work as part of a larger system with an Excel file. I've searched lots since yesterday but can only ever get part of the code I need and Im not advanced enough to edit them correctly. Here's what I need.

A Macro to search an excel file for two columns in particular out of a potential 20 or so. The headings I want to locate are "Temperature" and "Time". These two columns are then selected and copied but I need the macro to copy whatever is above two blank cells, i.e to select and copy the entire column even if there is a single blank cell but to stop if it reaches two blank cells. This has to be repeated for both the "Temperature" and "Time" columns.

Next I need the macro to paste the two columns side by side into sheet2, titled Temp/Time starting on cell A1 and B1.

I can get as far as searching one for column copying it and pasting it to another sheet but can't seem to get it to search for a second column and repeat the copy paste step to a new comumn on sheet 2.

Any help would be great. Im trying to educate myself on VBA but there's a lot to take in!
James
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,425
Messages
6,124,826
Members
449,190
Latest member
rscraig11

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