Macro or function to copy cell B to multiple rows and then populate cell A2 onwards

avaris79

New Member
Joined
Dec 23, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I am new to this forum and excel macro.
I have data in column A where it is a single value & in column B where it is multiple values separated by ";".
Is there a way, using macro or function, to convert column B to multiple rows, then copy values from A1 to A+n onwards? Refer to my attached pictures for reference.
Thank you.
 

Attachments

  • Source.jpg
    Source.jpg
    17.1 KB · Views: 13
  • Target.jpg
    Target.jpg
    19.2 KB · Views: 13
How about the Ubound(x) statement? In this case X = column B which is required to be split?
X is an array containing the split result of column B
So Ubound (x) number of element in the array X
Hope this clear the issue
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You are welcome and thank you for the feedback
Be happy
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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