#1   Report Post  
Posted to microsoft.public.excel.misc
String Manipulation
 
Posts: n/a
Default String Manipulation

I have data imported from accounting software that I'm working with. What I
need is to have a column that diplays just the length of the part off the end
of the description. Lengths are in formats like 20-1/4, 4, 5-1/4. They are
always preceded by one or more spaces and are always at the end of the
description. Can anyone help? Following are two examples of descriptions
06530FB0325_SP MDP REC PCH 155 3-1/4
12810FB46_SP MDP LO STD PCH 155 46
Q5478MB/W075_DPBSP REC RAL6027 155 7-1/2
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default String Manipulation

There are a number of string parsing functions you can use, such as
MID, LEFT, and RIGHT. All of these depend on you knowing where the
desired columns are. In your examples, the lengths are always at the
end, but the lengths are a different number of columns: for instance,
the second one is 46 (2 columns) and the third is 7*1/2 (5 columns).

To make this exact, we need to find an element that is common to each
row *and* close to the length portion of the string. I see the value
155 on each line- if that is common to EVERY line, you could use this
formula
=MID(A2,FIND("155 ",A2,1)+4,LEN(A2))
.... where the imported string is in cell A2.

Is that 155 on every line?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default String Manipulation

See if this works for you:
=RIGHT(A1,MATCH(" ",MID(A1,LEN(A1)+1-ROW(INDIRECT("1:"&(LEN(A1)))),1),0)-1)

Commit that array formula by holding down [Ctrl] and [Shift] when you press
[Enter]


Does that help?

***********
Regards,
Ron


"String Manipulation" wrote:

I have data imported from accounting software that I'm working with. What I
need is to have a column that diplays just the length of the part off the end
of the description. Lengths are in formats like 20-1/4, 4, 5-1/4. They are
always preceded by one or more spaces and are always at the end of the
description. Can anyone help? Following are two examples of descriptions
06530FB0325_SP MDP REC PCH 155 3-1/4
12810FB46_SP MDP LO STD PCH 155 46
Q5478MB/W075_DPBSP REC RAL6027 155 7-1/2

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
Need to do a fancy string copy plus Sally Excel Discussion (Misc queries) 7 November 4th 05 02:06 PM
Looking up a string of text within a string of text tobriant Excel Worksheet Functions 4 September 20th 05 06:59 PM
Auto convert an alphanumeric string (CIS9638S) to numbers only? Gary L Brown Excel Worksheet Functions 1 September 7th 05 01:17 AM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM


All times are GMT +1. The time now is 09:10 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"