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
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,808
Messages
5,513,520
Members
408,956
Latest member
DianChris

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top