Need help in copy and pasting multiple lines based on a criteria

xlbaby

New Member
Joined
Nov 5, 2012
Messages
39
Hi all,


I need an urgent help on a macro. I have very minimal experience with Macro and is struggling to get this done.

I have a spreadsheet that has close 22K rows with a lot of data. The data is spread across various columns. The cell A1 is the unique id which repeats in various rows.

Criteria Tab: The criteria using which the output needs to be generated. Unique ID (with duplicates removed)
Data tab: The tab where the data is available. The columns where the data is available is on the top row
Output tab: How I want the output to be.

What I need is an output where all the same unique id details are copied and pasted in an order sorted A-Z based on the unique id. The unique id (after removing duplicates) will be in a separate tab within the sheet.

I will have multiple tabs with the data I need to copy. The spreadsheet that I have attached has all the details.

I hope I have explained it properly. If not, I am ready to give additional details.

Thank you so much for your help.

Help Needed.xlsx
ABC
1EEID
2AAB11
3ABB12
4ABA11
5ABB13
6
7
8
9
10
11
12
13
14
15
16
17
Criteria


Help Needed.xlsx
ABCDE
1Cell A1Cell V1Cell X1Cell AA1Cell AC1
2EE IDDate PurchasedDate SoldUnits soldPrice
3AAB1112/14/20126/2/202097753
4AAB113/21/20125/12/202089099
5AAB117/11/20095/6/201897998
6AAB1111/19/201411/2/201981978
7ABA114/27/20135/2/201839972
8ABA113/30/20124/29/201865781
9ABA115/30/20109/9/201821457
10ABA119/18/20125/29/202036190
11ABB123/30/201312/5/201790469
12ABB124/12/201010/1/201868896
13ABB128/23/201010/8/201816785
14ABB128/20/20132/29/202061963
15ABB1310/12/20124/1/2019763100
16ABB1310/3/201110/28/201876464
17ABB134/25/201212/22/201981280
18ABB138/20/20105/30/201834582
Data


Help Needed.xlsx
ABCDE
1EE IDDate PurchasedDate SoldUnits soldPrice
2AAB1112/14/20126/2/202097753
3AAB113/21/20125/12/202089099
4AAB117/11/20095/6/201897998
5AAB1111/19/201411/2/201981978
6ABA114/27/20135/2/201839972
7ABA113/30/20124/29/201865781
8ABA115/30/20109/9/201821457
9ABA119/18/20125/29/202036190
10ABB123/30/201312/5/201790469
11ABB124/12/201010/1/201868896
12ABB128/23/201010/8/201816785
13ABB128/20/20132/29/202061963
14ABB1310/12/20124/1/2019763100
15ABB1310/3/201110/28/201876464
16ABB134/25/201212/22/201981280
17ABB138/20/20105/30/201834582
Output
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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