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
1Title1Title2Title3 [Height]Title4
2
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
3
4BA 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
5
6
7
8BA 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>
</tbody>
Sheet1
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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