Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copy all text in a string prior to the last period...

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




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Copy all text in a string prior to the last period...

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


If your files are all named with the same structure that you showed us in
your sample names, then you can simply do this...

=LEFT(A1,25)

Rick Rothstein (MVP - Excel)

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
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
Search text string for ssn and copy to new column mary Excel Discussion (Misc queries) 8 December 28th 07 03:13 AM
Copy Text String from between () [email protected] Excel Worksheet Functions 2 August 22nd 07 05:38 PM
I need to change cell string lenths prior to upload into sql table kevt Excel Worksheet Functions 1 September 6th 06 06:44 PM
Copy a string text to cell if another cell not empty Pasmatos Excel Discussion (Misc queries) 0 November 25th 05 03:54 PM


All times are GMT +1. The time now is 10:18 AM.

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"