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

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

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

[TABLE="width: 361"]
<tbody>[TR]
[TD] Job
[/TD]
[TD]User
[/TD]
[TD]Max RAM
[/TD]
[TD]Status
[/TD]
[/TR]
[TR]
[TD]2979857
[/TD]
[TD]Mike
[/TD]
[TD]9.5
[/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]2979863
[/TD]
[TD]John
[/TD]
[TD]3.3
[/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]2979864
[/TD]
[TD]Mike
[/TD]
[TD]16.1
[/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]2979866
[/TD]
[TD]Mike
[/TD]
[TD]5.2
[/TD]
[TD]complete
[/TD]
[/TR]
</tbody>[/TABLE]



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
[TABLE="width: 515"]
<tbody>[TR]
[TD]%
[/TD]
[TD]Job
[/TD]
[TD]Hours
[/TD]
[TD]Issue
[/TD]
[TD]Frames
[/TD]
[TD]Status
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]2980158
[/TD]
[TD]7
[/TD]
[TD][/TD]
[TD][/TD]
[TD]running
[/TD]
[/TR]
[TR]
[TD]14
[/TD]
[TD]2980160
[/TD]
[TD]7
[/TD]
[TD][/TD]
[TD][/TD]
[TD]running
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]2980411
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]2980420
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]2980422
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]complete
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]2980423
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]complete
[/TD]
[/TR]
</tbody>[/TABLE]

In Sheet PRman
[TABLE="width: 318"]
<tbody>[TR]
[TD]User
[/TD]
[TD]Status
[/TD]
[TD]%
[/TD]
[TD]Job
[/TD]
[/TR]
[TR]
[TD]Bill
[/TD]
[TD]pending
[/TD]
[TD]97
[/TD]
[TD]2979389
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]complete
[/TD]
[TD]100
[/TD]
[TD]2979828
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]complete
[/TD]
[TD]100
[/TD]
[TD]2979905
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]pending
[/TD]
[TD]95
[/TD]
[TD]2979945
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]running
[/TD]
[TD]44
[/TD]
[TD]2979990
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]complete
[/TD]
[TD]100
[/TD]
[TD]2979993
[/TD]
[/TR]
[TR]
[TD]Jane
[/TD]
[TD]complete
[/TD]
[TD]100
[/TD]
[TD]2980004
[/TD]
[/TR]
</tbody>[/TABLE]
 
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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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,223,632
Messages
6,173,472
Members
452,516
Latest member
archcalx

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