Learn how to a build a cloud-first strategyRegister Now

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 221

# Separating info in a report

I have a lot of rows of data that I need to separate some information in one column.  The data lists a thread size description like:

1-8 X 10-1/2 B7 STUD
1-8 X 11 B7 STUD
1 1/8-8 X 15 1/4 B7 STUD
1 1/8-8 X 14-1/2 B7 STUD

I want to separate this information and pull out the size of the thread, which is displayed before the "X" in one column and then put the lengh of the thread, which is displayed after the "X" in a separate column.

Column 1 would look like this now"

1-8
1-8
1 1/8-8
1 1/8-8

Column 2 would look like this:

10 1/2
11
15 1/4
14-1/2

The number of characters to the left and right of the "X" will vary but it will always have the "X" and it will always say "B7 STUD" after the size.

I would prefer to do this in Crystal 2008 but if that can't be done then I can export the report into Excel and fix it there.
0
ITworks
1 Solution

Professor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Formula for 1st column:
Split({your_field}," X ")[1]

Formula for 2st column:
Replace(Split({your_field}," X ")[2]," B7 STUD","")
0

Commented:
Assuming the initial value is in A2, the first item is:

=TRIM(LEFT(A2,SEARCH("X",A2)-1))

The second:

=TRIM(LEFT(MID(A2,SEARCH("X",A2)+1,LEN(A2)),SEARCH("B7",MID(A2,SEARCH("X",A2)+1,LEN(A2)))-1))
0

## Featured Post

Tackle projects and never again get stuck behind a technical roadblock.