#1   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Trim

Hello,

I have hundreds of accounts listed in a column that look like this:

02172-LIPOSCIENCE-02172

I need to pull out the first five digits from the column

02172

I cannot drop the first digit (zero), so I guess it would need to be trimed
As a text? Can someone help me with this formula?

Thanks so much
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Trim

Allow me to clarify a little more. I need hte digits preceeding the first
hyphen "-" the digits preceeding the hyphen can be as many as five or as
little as 1

"Jim" wrote:

Hello,

I have hundreds of accounts listed in a column that look like this:

02172-LIPOSCIENCE-02172

I need to pull out the first five digits from the column

02172

I cannot drop the first digit (zero), so I guess it would need to be trimed
As a text? Can someone help me with this formula?

Thanks so much

  #4   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Trim

With the data in A1, use this formula:


=LEFT(A1,FIND("-",A1,1)-1)



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default Trim

Hi Jim
Try this :
=LEFT(A6,FIND("-",A6,1)-1)
Assuming your data is in A6, change to your needs.
HTH
John
"Jim" wrote in message
...
Allow me to clarify a little more. I need hte digits preceeding the first
hyphen "-" the digits preceeding the hyphen can be as many as five or as
little as 1

"Jim" wrote:

Hello,

I have hundreds of accounts listed in a column that look like this:

02172-LIPOSCIENCE-02172

I need to pull out the first five digits from the column

02172

I cannot drop the first digit (zero), so I guess it would need to be trimed
As a text? Can someone help me with this formula?

Thanks so much


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
=TRIM Shayra Excel Discussion (Misc queries) 5 October 16th 08 07:16 PM
Using =TRIM() Chuda Excel Worksheet Functions 6 November 9th 06 03:05 PM
Trim Steved Excel Worksheet Functions 7 August 1st 06 05:43 AM
Trim if? John Excel Worksheet Functions 6 June 26th 06 04:44 PM
Trim help please Dave New Users to Excel 8 September 1st 05 07:18 PM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"