HELP! - VBA to VLookup, Copy & Paste

Joey86

New Member
Joined
Jul 25, 2013
Messages
32
Hi Guys,

I really need help trying to get a VBA macro to do a Vlookup on another sheet then to find all the rows with that value, then copy them and paste them on another sheet, hopefully this is possible and that someone can help cause I don't have any knowledge on VBA.

Ok so I have 2 sheets, 'Daily Report' and 'Exceptions'. On the 'Daily Report' sheet when a user changes the sections in yellow shown below, I'm needing the macro to go to the 'Exceptions' page and lookup that selection criteria then copy all the values (might be more than 1 row) then it needs to come back to the 'Daily Report' sheet and paste the values down below in the green.

Daily Report Sheet
15099_10151832229131132_2000310083_n.jpg


Exceptions Sheet
1236763_10151832229141132_468470223_n.jpg
 
Exceptions Sheet:
[TABLE="width: 938"]
<tbody>[TR]
[TD="width: 116, bgcolor: #4F81BD"]Title[/TD]
[TD="width: 83, bgcolor: #4F81BD"]Customer[/TD]
[TD="width: 75, bgcolor: #4F81BD"]Date[/TD]
[TD="width: 103, bgcolor: #4F81BD"]Client Server[/TD]
[TD="width: 88, bgcolor: #4F81BD"]Error Code[/TD]
[TD="width: 84, bgcolor: #4F81BD"]Sequence[/TD]
[TD="width: 114, bgcolor: #4F81BD"]TSD Reference[/TD]
[TD="width: 68, bgcolor: #4F81BD"]Reason[/TD]
[TD="width: 112, bgcolor: #4F81BD"]Current Status[/TD]
[TD="width: 95, bgcolor: #4F81BD"]SLA Exempt[/TD]
[/TR]
</tbody>[/TABLE]

Consolidated Daily Report:
[TABLE="width: 1249"]
<tbody>[TR]
[TD="class: xl65, width: 232"]Customer[/TD]
[TD="class: xl66, width: 161"]Date[/TD]
[TD="class: xl66, width: 161"]Client Server[/TD]
[TD="class: xl66, width: 125"]Error Code[/TD]
[TD="class: xl66, width: 140, colspan: 2"]Sequence[/TD]
[TD="class: xl66, width: 110"]TSD Reference[/TD]
[TD="class: xl66, width: 115"]Reason[/TD]
[TD="class: xl66, width: 120"]Current Status[/TD]
[TD="class: xl67, width: 85"]SLA Exempt[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Are you sure that you don't have a blank column between Sequence and TSD Reference on worksheet Consolidated Daily Report? B:K is 10 columns, but you only have 9 headings.
 
Upvote 0
Nope there's no space, see the one I initally posted was a test worksheet and I'm trying to implement that same thing into the original, I've just uploaded the real workbook to my online storage and removed the customer details here: Storage_Backup_Report_v2 - Testing.xlsm sorry for some reason this post won't let me add attachments.
 
Upvote 0
That worked great, didn't know the merged field would affect it, although it copied the customer selected as well as the customer that wasn't selected, is that normal?
 
Upvote 0
The criteria range needs to be 2 rows. The heading Customer in the first row and the name of the customer in the second.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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