VBA: copy text from A based on serial number in B

jaimond

Board Regular
Joined
Jun 23, 2017
Messages
56
Based on column B data value, copy column A data in C and D column. Only highest no related sub-data will go in C column. Rest will go in D.


ABCD
BA Drom
10AB DRAG
CAC ISO
B3A PK
344 M
5.777327
3.479375
15.58231
5.201591
4.01268
CAC ISO
BA Drom, 10AB DRAG, B3A PK, 344 M
BA Drom
10AB DRAG

kak1 ISO
B3A PK
34M4 M

5.777327
3.479375

15.58231
15.58231
4.01268
kak1 ISO, B3A PKBA Drom, 10AB DRAG, 34M4 M
BA Drom
10AB DRAG
CAC ISO
B3A PK
34M4 M
5.777327
3.479375

15.58231

5.201591

4.01268
CAC ISOBA Drom, 10AB DRAG, B3A PK, 34M4 M

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Title1[/TD]
[TD="align: center"]Title2[/TD]
[TD="align: center"]Title3 [Height][/TD]
[TD="align: center"]Title4[/TD]

[TD="align: center"]2
[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]

</tbody>
Sheet1
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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