Reputation: 65
I have a column where the data is something like this : 2, 3 I want to extract number 2 and put it under one column and extract 3 and put it in another column.
Please help me with this.
Upvotes: 0
Views: 952
Reputation: 2328
Use the Text to Columns feature on the Data tab. In the menu, you'll select Delimited and on the next screen select Comma as your delimiter.
If you absolutely need to use VBA, you can use the Split function.
Split("42, 12, 19", ", ")
Will return the following array:
{"42", "12", "19"}
You can then paste those values into the columns.
Upvotes: 1