Split up cell contents into multiple cells (VBA)

rdw72777

Well-known Member
Joined
Apr 5, 2005
Messages
723
I know I could codea FIND formula to do this, but for various reasons need to do this via VBA.

I have a cell that includes the following value: "CD, DVD, DVR, None"

I want to create the ability to convert this into 4 cells (in one column) where each cell is just one of the values. Like I said, I know the FIND function could do it ina formula, but was wondering if there was a way to do it in VBA (and if such a VBA code existed better than say using the WorksheetFunction code).
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I have a cell that includes the following value: "CD, DVD, DVR, None"

I want to create the ability to convert this into 4 cells (in one column) where each cell is just one of the values.

So, let's say the data are in column A, and it needs to be split to columns B, C, D, E? Each cell in that row gets 1 of the 4 values?
 
Upvote 0
Yup, each value gets its own cell (without the comma).

I mean I'll be putting it into 4 rows in column A, but if you can do it in the same row going across the columns, I can work with it.
 
Upvote 0
Yeah I've seen a lot of formula absed sutff (Text to columns down't really work here as the process I'm asking about is part of a much larger process, and like I said I don't want the data in multiple columns but rather multiple rows within a column).

I guess I'll just use FIND within VBA.
 
Upvote 0
What cells need to be converted to 4 rows below each other?
 
Upvote 0

Forum statistics

Threads
1,203,236
Messages
6,054,292
Members
444,715
Latest member
GlitchHawk

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