Pull Specific Data from one Sheet to Another using Macro

MarkHutch

New Member
Joined
Dec 14, 2017
Messages
8
Hi

I was wondering if anyone was able to help. I have a set of data in one Sheet and I need specific Data from that sheet moved to a second sheet and a comment added. So For example Sheet 1 has Columns A through E with all employees data. I would need this data moved to sheet 2, which has those columns plus extras through to column K. But I would need only specific employee’s info. This I’m hoping could be done by say ID and for instance take only 50012345 John Smith and 50098765 Adam Apples (along with the rest of the relevant info for dates, start time and finish time. Column F is then normally blank. For those same specific employees, I would need this to be populated with the word ‘Travel’. Then again in the comments section, a comment would need to be added, which is again specific to the employee (ID number). Is this possible to do with a macro? Right now we are having to manually do this and it takes ages.
Some data may also already exist in Sheet 2, Would it be possible for any new data being brought into this to be applied under the data already in there. Or would it need to be a completely different sheet and then a copy and paste done?

Any assistance you can provide would be greatly appreciated. This is doing my head in :)
Thanks

Safe journeys

Mark
[TABLE="width: 0"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[/TR]
[TR]
[TD]Name
[/TD]
[TD]ID
[/TD]
[TD]NA Date
[/TD]
[TD]StartTime
[/TD]
[TD]FinishTime
[/TD]
[TD]NonAvailability
[/TD]
[TD]CommentText
[/TD]
[TD]Street
[/TD]
[TD]City
[/TD]
[TD]PostCode
[/TD]
[TD]CountryID
[/TD]
[/TR]
[TR]
[TD]John Smith
[/TD]
[TD]50012345
[/TD]
[TD]15/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Shopping
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John Smith
[/TD]
[TD]50012345
[/TD]
[TD]16/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Shopping
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John Smith
[/TD]
[TD]50012345
[/TD]
[TD]17/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Shopping
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John Smith
[/TD]
[TD]50012345
[/TD]
[TD]18/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Shopping
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob Brown
[/TD]
[TD]50076543
[/TD]
[TD]01/08/2016
[/TD]
[TD]17:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Visiting Parents
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob Brown
[/TD]
[TD]50076543
[/TD]
[TD]02/08/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Visiting Parents
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob Brown
[/TD]
[TD]50076543
[/TD]
[TD]02/08/2016
[/TD]
[TD]17:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Visiting Parents
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob Brown
[/TD]
[TD]50076543
[/TD]
[TD]03/08/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Visiting Parents
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Adam Apples
[/TD]
[TD]50098765
[/TD]
[TD]27/07/2016
[/TD]
[TD]17:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Fishing
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Adam Apples
[/TD]
[TD]50098765
[/TD]
[TD]28/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Fishing
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Adam Apples
[/TD]
[TD]50098765
[/TD]
[TD]28/07/2016
[/TD]
[TD]17:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Fishing
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Adam Apples
[/TD]
[TD]50098765
[/TD]
[TD]29/07/2016
[/TD]
[TD]00:00
[/TD]
[TD]08:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Fishing
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Adam Apples
[/TD]
[TD]50098765
[/TD]
[TD]29/07/2016
[/TD]
[TD]17:00
[/TD]
[TD]23:59
[/TD]
[TD]Travel
[/TD]
[TD]Gone Fishing
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Must have been, I didn't post anything between post#6 & post#10
 
Upvote 0
Hi

That worked perfectly for copying all data, inputting the 'Travel' text and applying the relevant comment as per the ID. thank you very much
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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