Moving text to a new column

RebeccaF

New Member
Joined
Jun 10, 2021
Messages
5
Office Version
  1. 2007
Platform
  1. Windows
Hi sorry to be back with another question so quickly. I've been sent a spreadsheet with all the text for each row in column a. Each row starts with Line 145 (could be a different number put here): and then the text is beside it. What I've been asked to do is to keep Line (whatever number): in column a and then move the rest of the text to column b. I found I could do this easily enough by going into data, text to column, delimited, colon and finish. What I didn't realise though is that in some of the rows there is a second or third colon in the sentence. Is there an easy enough way for me to keep the line, number and colon in column a and keep the text in column b as when I do what I was doing earlier, it obvious separates the text into column c and d if there is another colon in it.
Thanks a million again and sorry if my explanation isn't the clearest!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You could create formulas to do it.

So, if you have an entry in cell A1, put these formulas in:
cell B1: =LEFT(A1,FIND(":",A1)-1)
cell C1: =MID(A1,FIND(":",A1)+1,LEN(A1))
and copy down for all rows
 
Upvote 0
Thank you so much for that. I'll get the hang of these things eventually!
 
Upvote 0
Hi
I know your question was answered by Joe4 but if you like you can post a sample of your table here. There is an option in Power Query to tell which delimter should be used, the most left or most right etc. I am also interested to try your table using Power Query. Thanks
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,093
Members
448,944
Latest member
SarahSomethingExcel100

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