Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default i need a help on the excel formulas

Dear Sir

how can i determine the 2nd occurrence for a string,

for example:

if i have the following string

D:\usama backup\Yanbu Project\HMI\Work done\usama.xls

and i need to detect the 2nd "\" or the third "\" or the last "\"

i can use find but find will allow me to determine the first "\" or
the "\" after a certain start number, but in case that i need the last
occurrence of the "\" i will not be able to use find

can you please help me on that

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default i need a help on the excel formulas

Try something like this to extract the substring starting from the nth
instance of "\" :

=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,"\",CHAR(1),n)) +1,255)

Where n = instance number

If n count of "\" then you'll get an error.

Count of "\":

=LEN(A1)-LEN(SUBSTITUTE(A1,"\",""))

--
Biff
Microsoft Excel MVP


wrote in message
oups.com...
Dear Sir

how can i determine the 2nd occurrence for a string,

for example:

if i have the following string

D:\usama backup\Yanbu Project\HMI\Work done\usama.xls

and i need to detect the 2nd "\" or the third "\" or the last "\"

i can use find but find will allow me to determine the first "\" or
the "\" after a certain start number, but in case that i need the last
occurrence of the "\" i will not be able to use find

can you please help me on that



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
Copying formulas from Excel 2003 to Excel 2007 [email protected] Excel Discussion (Misc queries) 4 August 9th 07 06:06 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
Excel formulas Mike Excel Worksheet Functions 1 August 1st 06 04:57 PM
Help with Excel formulas Tara Martin Excel Worksheet Functions 3 April 3rd 06 08:18 PM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"