Function to strip unwanted text I don't think it is Trim

Kurt

Well-known Member
Joined
Jul 23, 2002
Messages
1,664
Hello All,

What is the function to strip a line of text something like this:

file://Server/ServerHome01/UserID/Backup/Program Files/Microsoft Office/Office/Samples/Solutions.mdb

I want to delete all up to the UserID, cut that and paste it in a separate cell, I think want to take the info to the right and cut it and paste it in another adjacent cell on the same line.

As always thanks for any and all responses!

Kurt
 
Boy I went the long way! I used the Convert Text to Columns in Excel 2007.

I would still like to learn the function equivalent if someone can show me how to combine the function and or use a vba macro that would be great!

:) :) :) :)
Thanks,


Kurt
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Check out the Split Function.

Example in this UDF

Code:
Function getstring(c As Range, delim As String, nm As Long)
Dim mydata As Variant

mydata = Split(c, delim)
getstring = mydata(nm)
End Function

Now use a formula like

=GETSTRING(A1,"/",4)

That splits the string into parts seperated by /
Then returns the 4th item.
 
Upvote 0
To be more specific, it actually returns the 5th item (after the 4th /)
file: = 1st item (use 0 for the data before the first /)
nul value = 2nd item (use 1 for the data after the first /)
server = 3rd item (use 2 for the data after the 2nd /)
serverhome01 = 4th item
userid = 5th item
 
Upvote 0

Forum statistics

Threads
1,215,580
Messages
6,125,654
Members
449,245
Latest member
PatrickL

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