Copy cell contents in seperate cells

lapta301

Well-known Member
Joined
Nov 12, 2004
Messages
1,001
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a need for a formula I think

In a single cell I have loads of data that is separated by a comma and a space like:
GU1, GU2, GU3 1, GU3 2, KT7

In this example there are only 5 sets of data but in an extreme situation there can be many many more.

What I am trying to achieve is to copy each set seperated by a comma into its own cell without the leading space.

So that if the complete data is in I9 then GU1 with no space or comma goes into J9, GU2 goes into K9 and so on for as many sets of data is in the cell – could be 30

As ever any help would be most appreciated.

Thank you
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
One easy way is to select the column with all the data in it, then from Data tab in excel select Text To Columns and follow the on screen guide. You will probably need to comma separated option.

What text to column does it splits the data into separate columns depending the options you select. Make sure you have a few empty columns after column I.

I hope it helps.
 
Upvote 0
Excel 2010
IJKLMNOPQRSTUVWXYZAA
9GU1, GU2, GU3 1, GU3 2, KT7GU1GU2GU3 1GU3 2KT7

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
J9=LEFT(I9,SEARCH(",",I9)-1)
K9=TRIM(MID(SUBSTITUTE($I$9,",",REPT(" ",999)),COLUMNS($K$9:K9)*999,999))

<tbody>
</tbody>

<tbody>
</tbody>

Copy the formula in K9 across
 
Upvote 0
Thank you one and all for the replies which work fine.

FormR thank you also for the link which I will look at closely later on.

Again my sincere thanks to you all for taking an interest in my problem
 
Upvote 0

Forum statistics

Threads
1,216,067
Messages
6,128,590
Members
449,461
Latest member
jaxstraww1

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