Macro Copy rows to Another Sheet based on Heading

michrome23

New Member
Joined
Dec 23, 2012
Messages
2
Windows 7
Excel 2010

There are 13 columns in sheet ‘Raw Data’
Copy data from 'Raw Data' to specified sheet name in column A
But only extract those columns that Match Headings in the output sheet

So I would need a macro to

  1. Copy paste rows from sheet ‘Raw Data’
  2. If value in Column A = sheet name
  3. Only extract data with Corresponding Row Header

Example)
On Sheet ‘Raw Data’
A2 = Cache

SHEET
Hours
%
Job
Status
User
Priority
Issue
Frames
Time Completed
Average Frame HH:MM
Avg RAM
Max RAM
Cache
19
100
2979857
complete
Mike
3000
Lighting Changes
101
Fri, Dec 21, at 06:21 PM
00:32
3.9
9.5
Cache
79
100
2979864
complete
Mike
100
Tex
Sat, Dec 22, at 02:09 AM
00:42
5.3
16.1
Cache
19
100
2979989
complete
John
100
Feather Penetrations
Most
Fri, Dec 21, at 07:47 PM
00:26
2.1
6.7
Cache
7
100
2980028
complete
John
3000
Shadow
All
Fri, Dec 21, at 07:15 PM
00:16
1.2
3.5
Cache
8
100
2980203
complete
Mike
2900
Missing Geo
All
Fri, Dec 21, at 08:32 PM
00:05
1.2
4.7
Cache
7
100
2980204
complete
Mike
2900
Missing Geo
All
Fri, Dec 21, at 08:37 PM
00:05
1.2
5.0
Cache
1
100
2980205
complete
Nick
2900
Fri, Dec 21, at 08:08 PM
00:01
0.3
1.7
Mantra
25
100
2979770
complete
Jane
100
Texture
All
Fri, Dec 21, at 10:46 PM
00:39
2.9
9.6
Mantra
40
99
2979777
running
Jane
100
Sat, Dec 22, at 03:03 AM
Mantra
50
100
2979780
complete
Jane
100
Penetrations
All
Fri, Dec 21, at 07:44 PM
00:16
2.3
8.6
Mantra
54
100
2979782
complete
Jane
100
Penetrations
All
Fri, Dec 21, at 08:41 PM
00:17
2.0
8.4
Misc
100
2979572
complete
Marcy
1500
Fri, Dec 21, at 06:05 PM
00:43
12.0
14.0
Misc
58
43
2979848
Pending
John
3100
N/A
Misc
72
97
2979867
Pending
John
100
N/A
Playblast
7
11
2980158
running
Jane
3000
Sat, Dec 22, at 11:25 AM
Playblast
7
14
2980160
running
Jane
3000
Sat, Dec 22, at 10:38 AM
Playblast
1
100
2980411
complete
Nick
2900
Fri, Dec 21, at 08:09 PM
00:00
0.5
0.7
Playblast
1
100
2980420
complete
Jane
2900
Fri, Dec 21, at 08:15 PM
00:00
0.4
0.7
Playblast
1
100
2980422
complete
Jane
2900
Fri, Dec 21, at 08:15 PM
00:00
0.5
0.7
Playblast
1
100
2980423
complete
Jane
100
Fri, Dec 21, at 08:15 PM
00:00
0.4
0.7
Playblast
6
100
2980432
complete
Jane
2800
Fri, Dec 21, at 09:10 PM
00:05
1.7
2.7
PRMan
79
97
2979389
pending
Bill
1500
N/A
PRMan
31
100
2979828
complete
Jane
3000
Fri, Dec 21, at 06:46 PM
00:49
2.2
8.8
PRMan
11
100
2979905
complete
Jane
100
Fri, Dec 21, at 10:16 PM
00:45
5.8
13.7
PRMan
4
95
2979945
pending
Jane
100
N/A
PRMan
41
44
2979990
running
Jane
100
Sat, Dec 22, at 05:46 AM

<tbody>
</tbody>

Find sheet named Cache
Only extract data for corresponding Headings
(Those that Match in sheet Raw Data)

Job
User
Max RAM
Status
2979857
Mike
9.5
complete
2979863
John
3.3
complete
2979864
Mike
16.1
complete
2979866
Mike
5.2
complete

<tbody>
</tbody>



The data extracted for each sheet varies and would need to be able to change on the fly

The ‘Raw Data’ is a dynamic range as well

Further Examples)

In Sheet Playblast this information would need to be extracted
%
Job
Hours
Issue
Frames
Status
11
2980158
7
running
14
2980160
7
running
100
2980411
1
complete
100
2980420
1
complete
100
2980422
1
complete
100
2980423
1
complete

<tbody>
</tbody>

In Sheet PRman
User
Status
%
Job
Bill
pending
97
2979389
Jane
complete
100
2979828
Jane
complete
100
2979905
Jane
pending
95
2979945
Jane
running
44
2979990
Jane
complete
100
2979993
Jane
complete
100
2980004

<tbody>
</tbody>
 
Sir hiker95 ,

Good evening here, hope you're fine same as me.

I find your reply to this thread nearly effective to what I wanted to do with my workbook

But, would you kindly help me to adjust to your code, please. there are 2 things not clear to me because I am not really good in macro in fact I am newbie and just explore whenever I have idea that could be useful to my excel work, btw here are the 2 things:

1. I find that redoing/re alt+F8 makes results carry over from last result over and over which could not be effective to what I need, I prefer data to be paste will be cleared first before pasting results - or just additional row if there will be new to add matching on the criteria

2 How to adjust the result, I mean I wanted the result to start in A3 of A4 which is currently has result falls to A2

Reference: Cache Sheets only (Since I only need to move data from raw to 1 sheet only.

Your response would be highly appreciated,

Thanks
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
juanlohika,

Welcome to the MrExcel forum.

I would assume that your raw data, and, results, are completely different from the person that originally started this thread, michrome23.

Please do not post your questions in threads started by others - - this is known as thread hijacking.

Always start a new thread for your questions and, if you think it helps, provide a link to any other thread as a reference.

Please follow the instructions in my reply to your Private Message.
 
Last edited:
Upvote 0
juanlohika,

After you start your own NEW thread, then, send me a Private Message with a link your NEW thread, and, I will have a look.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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