Extracting Words From Within a Cell

bradh_nz

Board Regular
Joined
May 23, 2006
Messages
92
I have multiple words (can vary from 1 to 10) within some cells and need a macro to extract these to new cells

CURRENT
Cell A1 "CIO-SPCH-31-01 CIO-APCH-31-02 CIO-ESSC-31-01"
Cell A2 "CIO-SAOP-32-01"
Cell A3 "CIO-IPOP-32-01"

OUTPUT REQUIRED

Cell B1 "CIO-SPCH-31-01"
Cell B2 "CIO-APCH-31-02"
Cell B3 "CIO-ESSC-31-01"
Cell B4 "CIO-SAOP-32-01"
Cell B5 "CIO-IPOP-32-01"

Any help appreciated.

Regrads
Brad
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi,

If you highlight your cells,

Then from the toolbar click,
Data | Text to columns

You should get a Convert text to columns wizard box,

Make sure Delimited is selected, then click next,
now put a tick in Space, now click finnish.

That should kind of give you what you want.

Cheers
Paul
 
Upvote 0
Hi

Thanks, yes this would normally work but the cell have the spaces in them by using ALT-Enter and it will not pick them up.

Thanks
Brad
 
Upvote 0
Howdy. You do a find/replace to get rid of the new line break. Find CHAR(10) and replace with a space.
 
Upvote 0
....CURRENT
Cell A1 CIO-SPCH-31-01 CIO-APCH-31-02 CIO-ESSC-31-01
Cell A2 CIO-SAOP-32-01
Cell A3 CIO-IPOP-32-01

OUTPUT REQUIRED

Cell B1 CIO-SPCH-31-01
Cell B2 CIO-APCH-31-02
Cell B3 CIO-ESSC-31-01
Cell B4 CIO-SAOP-32-01
Cell B5 CIO-IPOP-32-01......

1] Put your mouse pointer on the top of column header, between A and B

2] Click and move the pointer left, then reduce the column A to width : 7.00 (54 pixcels)

3] Select A1:A3 >> Edit >> Justify >> OK

Hope that helps

Regards
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,405
Members
448,958
Latest member
Hat4Life

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