TextAfter forumla

pigsfoot

Board Regular
Joined
Dec 13, 2007
Messages
60
Office Version
  1. 365
Hi,

I have some data in a Cell A1 which is ultimately an email signature. It reads something like.

Company:AN Company
Contact: email@email.com
Telephone: 0123456789
Website: www.website.com

This continues down the sheet for 150 lines with each line being a new contact.

I need to break each type ( company, contact etc ) down into separate cells so can then use it to import into a CRM system

I have a formula in cell B1 as =TextAfter(A1,"Company: ")
The return i get is AN CompanyContact:email@email.comTelephone and so on...

I cant seem to get it to stop at the word contact and only return the company name. Any help woudl be appreciated. Thanks
 

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 am guessing that you have soft carriage returns in that cell.
Try this:
Excel Formula:
=TEXTBEFORE(TEXTAFTER(A1,"Company:"),CHAR(10))

1720188631840.png
 
Upvote 0
Solution
Another option if you want all the info
Fluff.xlsm
ABCDE
1
2Company:AN Company Contact: email@email.com Telephone: 0123456789 Website: www.website.comAN Companyemail@email.com0123456789www.website.com
Sheet1
Cell Formulas
RangeFormula
B2:E2B2=TOROW(TRIM(INDEX(TEXTSPLIT(A2,":",CHAR(10)),,2)))
Dynamic array formulas.
 
Upvote 0
Perhaps to get all the values
=TOROW(DROP(TEXTSPLIT(A1,":",CHAR(10)),,1),1)
 
Upvote 0
One more option:
Excel Formula:
=TEXTAFTER(TEXTSPLIT(A1,CHAR(10)),":")
 
Upvote 0
Fantastic, Saved me a huge job. I had already started using @Joe4 formula before i saw the rest so i'm all done. Many Thanks all, Plus 1 for the community
 
Upvote 0
You are welcome.
Glad we could help!

Note, if you do need to extract all 4 items from each cell, my solution requires you to create 4 formulas, while some of the other ones only require one formula that "spills" into the other cells with the other values.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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