Aug 24, 2010 #1 JGKWORK IS-IT--Management Joined Apr 1, 2003 Messages 342 Location GB Hi, How do I create a formula to return a string from the following (between the last "\"'s)? \Asbestos\Inspection\001_Dscf0026_2009-09-06.JPG\ I want to return: 001_Dscf0026_2009-09-06.JPG Many thanks.
Hi, How do I create a formula to return a string from the following (between the last "\"'s)? \Asbestos\Inspection\001_Dscf0026_2009-09-06.JPG\ I want to return: 001_Dscf0026_2009-09-06.JPG Many thanks.
Aug 24, 2010 Thread starter #2 JGKWORK IS-IT--Management Joined Apr 1, 2003 Messages 342 Location GB Sorry meant to say I need this to be a formula in an Excel cell. Thanks. Upvote 0 Downvote
Aug 24, 2010 1 #3 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US Hi, Simplest way, paste this into a MODULE and use as you would any other spreadsheet function... Code: Function LastBit(rng As Range) As String LastBit = Split(rng.Value, "\")(UBound(Split(rng.Value, "\")) - 1) End Function Skip, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
Hi, Simplest way, paste this into a MODULE and use as you would any other spreadsheet function... Code: Function LastBit(rng As Range) As String LastBit = Split(rng.Value, "\")(UBound(Split(rng.Value, "\")) - 1) End Function Skip, Just traded in my old subtlety... for a NUANCE!
Aug 24, 2010 Thread starter #4 JGKWORK IS-IT--Management Joined Apr 1, 2003 Messages 342 Location GB Really appreciate that but I'm up against it with time and I don't really know VBA or how to impliment it is there any way to do this with a formula? Many thanks. Upvote 0 Downvote
Really appreciate that but I'm up against it with time and I don't really know VBA or how to impliment it is there any way to do this with a formula? Many thanks.
Aug 24, 2010 #5 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US alt+F11 toggles to the VB editor Insert > Module Paste alt+F11 toggles to the sheet in the cell you need this formula, and assuming that your data is in A1... [tt] =LastBit(A1) [/tt] Its THAT SIMPLE! Skip, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
alt+F11 toggles to the VB editor Insert > Module Paste alt+F11 toggles to the sheet in the cell you need this formula, and assuming that your data is in A1... [tt] =LastBit(A1) [/tt] Its THAT SIMPLE! Skip, Just traded in my old subtlety... for a NUANCE!
Aug 24, 2010 Thread starter #6 JGKWORK IS-IT--Management Joined Apr 1, 2003 Messages 342 Location GB Superb, worked great and I learned something very useful, many thanks. Upvote 0 Downvote