Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to do a fancy string copy plus | Excel Discussion (Misc queries) | |||
Looking up a string of text within a string of text | Excel Worksheet Functions | |||
Auto convert an alphanumeric string (CIS9638S) to numbers only? | Excel Worksheet Functions | |||
Inserting Filtered RC cell information into other worksheets | Excel Discussion (Misc queries) | |||
How do I use 3 cells to create the string for a lookup function? | Excel Worksheet Functions |