Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- extracting codes from a lot number

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 13, 2017 1:09 PM
(604 views)

Hi

I have a series of lot number in a column and the 5 alpha numeric digits need to be extracted into one column, digits 6-8 need to be extracted to another, digits 9-12 to another column (as per example below). I am hoping there may be a jsl code that could complete this task. I am new to jsl so any help is appreciated.

Example

Input Columns:

Lot number

H974286234825

Output Columns:

Col 1 Col 2 Col 3

H97428 623 4825

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 13, 2017 1:30 PM
(1192 views)

Solution

Use the Substr() function,

Help==>Scripting Index==>Character==>Substr

I have included a data table with the 3 new columns you want, using a formula for each of the new columns to get the data you want

Jim

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 13, 2017 1:30 PM
(1193 views)

Use the Substr() function,

Help==>Scripting Index==>Character==>Substr

I have included a data table with the 3 new columns you want, using a formula for each of the new columns to get the data you want

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 13, 2017 1:52 PM
(590 views)

Thanks alot Jim for the really fast response

This was exactly what I was looking for.