Oct 30, 2008 #1 devnaren Programmer Aug 23, 2007 49 US Hi All, I want to write a formula in such a way tht it should pick last word from a text. for eg: "AccNo/100045/DVS/John Smith" Now I want "John Smith" from above word. Can anyone help me out how to get tht word from a long text.
Hi All, I want to write a formula in such a way tht it should pick last word from a text. for eg: "AccNo/100045/DVS/John Smith" Now I want "John Smith" from above word. Can anyone help me out how to get tht word from a long text.
Oct 30, 2008 #2 lbass Technical User Feb 9, 2002 32,816 US Create a formula: if instr({table.string},"/") > 0 then split({table.string},"/")[ubound(split({table.string},"/"))] else {table.string} -LB Upvote 0 Downvote
Create a formula: if instr({table.string},"/") > 0 then split({table.string},"/")[ubound(split({table.string},"/"))] else {table.string} -LB
Oct 31, 2008 Thread starter #3 devnaren Programmer Aug 23, 2007 49 US It works perfect. Thanks a lot Lbass. Upvote 0 Downvote
Oct 31, 2008 #4 IdoMillet Instructor Feb 6, 2001 5,290 US Not that it matters much, but I think than a simpler version should work just as well: Code: split({table.string},"/")[ubound(split({table.string},"/"))] In other words, no need to test for "/". Cheers, - Ido view, email, export, burst, distribute, and schedule Crystal Reports. http://www.MilletSoftware.com Upvote 0 Downvote
Not that it matters much, but I think than a simpler version should work just as well: Code: split({table.string},"/")[ubound(split({table.string},"/"))] In other words, no need to test for "/". Cheers, - Ido view, email, export, burst, distribute, and schedule Crystal Reports. http://www.MilletSoftware.com