Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 11-23-2014, 12:03 AM
Catalin.B Catalin.B is offline Text in string Windows Vista Text in string Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Hi,
Here is another option, using a formula:
=TRIM(MID(SUBSTITUTE($A1,"/",REPT(" ",999)),(4-1)*999+1,999))
This will extract the 4'th item . If you want an item from another position, you can change the number 4 highighted in red to the position desired.
You can even use the column parameter to automatically extract all elements from the text string:
=TRIM(MID(SUBSTITUTE($A1,"/",REPT(" ",999)),(COLUMN(A1)-1)*999+1,999))
If you copy this to the right, it will be the equivalent of the text to columns functionality.
I wrote a text to columns formula using another approach, but more complicated, at: http://www.myonlinetraininghub.com/t...-excel-formula
But it's mostly an exercise for creating complex formulas, it's not very simple.
In the attachment, you can find the file from the link provided, it also has a VBA version of splitting a text, similar to Bruno's solution.
Attached Files
File Type: xlsm Text to Columns with formula and VBA.xlsm (179.0 KB, 10 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Text in string Way to search for a string in text file, pull out everything until another string? omahadivision Excel Programming 12 11-23-2013 12:10 PM
Text in string Extracting a phone number from a string that contains text and numbers. hommi16 Excel 2 06-05-2013 09:19 PM
Text in string Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM
Text in string Convert numbers to a specific text string francis Excel 1 10-06-2011 01:43 PM
Extract numbers from a text string aleale97 Excel 4 02-10-2011 10:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft