View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Copy all text in a string prior to the last period...

On Thu, 31 Mar 2011 00:48:08 GMT, Andrew Bell wrote:

Hello,

I am trying to gather all text before the last period in strings of text, for example I want to take everything before the file extension below, and place that in a new cell. Any thoughts how I can accomplish this? I appreciate the help. Thanks.


x:\TRX0000070.ATT%0000001.pdf
x:\TRX0000070.ATT%0000002.xlsx
x:\TRX0000070.ATT%0000003.pdf
x:\TRX0000070.ATT%0000004.pdf




A1: Data
B1: =LEFT(A1,FIND(CHAR(1),SUBSTITUTE(A1,".",CHAR(1),LE N(A1)-LEN(SUBSTITUTE(A1,".",""))))-1)