Solved

# Separating info in a report

Posted on 2011-10-15
209 Views
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
Question by:ITworks

LVL 22

Accepted Solution

Formula for 1st column:
Split({your_field}," X ")[1]

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

LVL 92

Expert Comment

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

## Write Comment

Please enter a first name

Please enter a last name

We will never share this with anyone.

## Featured Post

### Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

#### 760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

#### Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!