Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2012, 06:14 AM
gsrikanth gsrikanth is offline word up to last "\" Windows XP word up to last "\" Office XP
Competent Performer
word up to last "\"
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default word up to last "\"

in first column i have path
for example c:\a\b\c\d\e.jpg output c:\a\b\c\d\

any another example

\\gis-9\D\ARUNACHALPRADESH\ARUNACHAL\RAIGAM\info\arc000. dat



i need upto \\gis-9\D\ARUNACHALPRADESH\ARUNACHAL\RAIGAM\info\
Reply With Quote
  #2  
Old 03-14-2012, 07:39 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline word up to last "\" Windows 7 32bit word up to last "\" Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Here's one way

=LEFT(A1,SEARCH("\ /",SUBSTITUTE(A1,"\","\ /",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))

The formula will return a #VALUE! error if there are no \ characters in the cell being checked.
__________________
Colin

RAD Excel Blog
Reply With Quote
  #3  
Old 06-08-2012, 06:49 AM
konopca konopca is offline word up to last "\" Windows XP word up to last "\" Office 2003
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Hello
This is just what I was looking for, but I need everything after the last slash. Can you help?
Thanks
Carol
Reply With Quote
  #4  
Old 06-08-2012, 07:20 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline word up to last "\" Windows 7 32bit word up to last "\" Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi Carol,

Here's one way:

=RIGHT(A1,SEARCH("\ /",SUBSTITUTE(A1,"\","\ /",LEN(A1)-LEN(SUBSTITUTE(A1,"\",""))))+LEN("\ /")-1)
__________________
Colin

RAD Excel Blog
Reply With Quote
  #5  
Old 06-08-2012, 08:07 AM
konopca konopca is offline word up to last "\" Windows XP word up to last "\" Office 2003
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Colin -
It does not seem to work. I don't know what I am getting, column B seems to have variable amounts of data and only parts of words.
My column A has different numbers of slashes in each row (you know different levels of subfolders). Does this matter?
Carol
Reply With Quote
  #6  
Old 06-08-2012, 08:38 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline word up to last "\" Windows 7 32bit word up to last "\" Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

Sorry, don't know what happened there....

=RIGHT(A1,LEN(A1)-SEARCH("\ /",SUBSTITUTE(A1,"\","\ /",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))
__________________
Colin

RAD Excel Blog
Reply With Quote
  #7  
Old 06-08-2012, 08:50 AM
konopca konopca is offline word up to last "\" Windows XP word up to last "\" Office 2003
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Thank you, that did it.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
word up to last "\" Issues with Word 2007: making "--" into "—" kg28 Word 1 02-04-2012 01:33 PM
word up to last "\" Mailing: how to make the "page number" in Word is the same as "row number" in excel w Jamal NUMAN Word 1 09-03-2011 11:37 AM
How to edit the "Format" and the "show level" of an EXISTING table of content? Jamal NUMAN Word 2 08-14-2011 10:46 AM
word up to last "\" How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
word up to last "\" Word 2010: "Screen shot" and "Print Screen" and fitting the page boundaries! Jamal NUMAN Word 4 06-30-2011 05:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:29 PM.


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