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
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