tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,212
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I need a macro, that when run copys data from one sheet to another using header names,
So I have 3 sheets
Raw Data and Clean Data, then Control
In Control,
Column B I want to put the names for my Headers I want copied over, and Column C the destination Headers To Copy to like This
Sheet "Control"
So what I want the macro to do is take the first Copy Header "Name" and find what column it is in by looking along row 5,
If it not found then in D I want it to say "No Copy Header found" and move on to the next header
If found then copy from row 6 to last row.
then find destination Header name, in sheet " Clean Data row 3"
again if not found, in D I want it to say "No Destination header found" and move on to the next header
So basicly, in this case take the data in Sheet Raw data for each header listed copy and paste it into sheet clean data .
Please help if you can
Thanks
Tony
I need a macro, that when run copys data from one sheet to another using header names,
So I have 3 sheets
Raw Data and Clean Data, then Control
In Control,
Column B I want to put the names for my Headers I want copied over, and Column C the destination Headers To Copy to like This
Sheet "Control"
A | B | C | D | |
1 | Name of Copy Headers | Name of Paste headers | ||
2 | Name | Name | ||
3 | Sales | Sales Amount | ||
4 | Age | D.O.B | ||
5 | Amount | Amount | ||
6 | etc. | |||
7 | ||||
8 | ||||
So what I want the macro to do is take the first Copy Header "Name" and find what column it is in by looking along row 5,
If it not found then in D I want it to say "No Copy Header found" and move on to the next header
If found then copy from row 6 to last row.
then find destination Header name, in sheet " Clean Data row 3"
again if not found, in D I want it to say "No Destination header found" and move on to the next header
So basicly, in this case take the data in Sheet Raw data for each header listed copy and paste it into sheet clean data .
Please help if you can
Thanks
Tony