Help with Excel Text to Column

Maverick27

Active Member
Joined
Sep 23, 2010
Messages
329
Office Version
  1. 2013
Platform
  1. Windows
G'Day Excel Gurus

I need help in converting selective cell data from Text to Column.

The Column AF data looks the screenshot below:

excel-data.jpg


Anyone care to share a Macro Code (or Excel Function) to convert Text to Column for the following data :
  • Email ( 1st instance )
  • Facebook
  • Instagram
  • Web
The Final excel output should look like:

excel-data-final.jpg


Thanks in Advance.
 

Attachments

  • excel-data.jpg
    excel-data.jpg
    27.5 KB · Views: 11

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I would to show the 1st instances of the email:

So, the final output of Text to Columns should be:
  • Email ( 1st instance )
  • Email ( 2nd instance )
  • Facebook
  • Instagram
  • Web
 
Upvote 0
Ag2:
Excel Formula:
=TRIM(MID(FILTERXML("<a><b>"&SUBSTITUTE($AF2,";","</b><b>")&"</b></a>","//b[starts-with(., '"&AG$1&"')][1]"),LEN(AG$1)+2,100))

Copy across and down. You may need error handling in case one of the items doesn't exist.
 
Upvote 0
Ag2:
Excel Formula:
=TRIM(MID(FILTERXML("<a><b>"&SUBSTITUTE($AF2,";","</b><b>")&"</b></a>","//b[starts-with(., '"&AG$1&"')][1]"),LEN(AG$1)+2,100))

Copy across and down. You may need error handling in case one of the items doesn't exist.

Unfortunately, I'm getting a #VALUE! error all the way down.

error.jpg


I'm quite familiar with Excel Functions, but I'm quite rusty at the moment.

Would'nt it be simpler to use a Extract Substring function to isolate the Facebook, Instagram, Email Text..etc from the string & output to a cell ?

Just my thoughts.

 
Upvote 0
Unfortunately, I'm getting a #VALUE! error all the way down.

View attachment 75380

I'm quite familiar with Excel Functions, but I'm quite rusty at the moment.

Would'nt it be simpler to use a Extract Substring function to isolate the Facebook, Instagram, Email Text..etc from the string & output to a cell ?

Just my thoughts.


Here's the correct screenshot. Pls ignore the previous.

error-2.jpg
 
Upvote 0
Either change AI1 to Email as it was in the original sample data, or use the literal text in the formula instead of a cell reference. The case needs to match the cell content.
 
Upvote 0
Either change AI1 to Email as it was in the original sample data, or use the literal text in the formula instead of a cell reference. The case needs to match the cell content.
Hi Rory

Do you mind copying & pasting the String Text below in your Excel & show me the final output ?

Not sure what function is doing ? I want to extract the Email string, Facebook link, Instagram link.....etc into different cols.

 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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