New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

extract string of characters

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

extract string of characters

Postby faughabealach » Tue Feb 09, 2016 10:53 am

this is probably easy for some people but I want to extract characters from a string starting after a specific character and ending at the last character. The size of the string of characters may vary eg in the following I want to extract from each line the string of characters after ": ", and display each one in a separate cell. I tried the RIGHT function but as the no of characters can vary I could not get it to work

Quote Number: 1234567891 V01
Sold To: anycompany PLC
End User: everycompany Ltd
Order Type: Sale
List Price: 124,548.68

so what I need to see is
1234567891 V01 anycompany PLC everycompany Ltd Sale 124,548.68
can anyone help
  • 0

faughabealach
Rookie
 
Posts: 1
Joined: Feb 2, 2016
Reputation: 0
Excel Version: 2007

Re: extract string of characters

Postby pecoflyer » Tue Feb 09, 2016 11:48 am

Hi and welcome

it can be done with formulas, but I suggest using Data - Text to columns - Use : as delimiter and in the last part of the wizard select not to import the first column.
If you need to move to a row you can paste Special _transpose

The question is : Is this OK for your needs?
  • 0

A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010

Re: extract string of characters

Postby ConneXionLost » Tue Feb 09, 2016 11:50 am

If you really need to use a formula (despite Pecoflyer's recommendation), then try:

Code: Select all
=IFERROR(TRIM(MID(A2,SEARCH(":",A2)+1,LEN(A2))),"")


Cheers,
  • 0

ConneXionLost
Regular
 
Posts: 68
Joined: May 9, 2013
Location: Canada
Reputation: 19
Excel Version: 2003, 2010


Return to General Excel Questions

Who is online

Users browsing this forum: Google [Bot] and 128 guests