How to select only certain characters

abarefoot
abarefoot used Ask the Experts™
on
I'm trying to select specific groups of numbers from the ID's below.  As you can see there are two version of this ID.  The first section only has one characters, second section has 2 characters and last section has 2 characters for company1 and 3 for company2.  I need to split them all up into there own formula so I can move them around on a label without the dashes.  I know how to get the first number by using this.   Left ({HDRXXXXDEF.BIN_ID},1)  I'm not sure how to get the second and third groups.  

company 1 version:
A-00-01
company 2 version:
A-00-02a
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Professor of MIS at Penn State Erie and Owner, Millet Software
Commented:
Split({HDRXXXXDEF.BIN_ID},"-")[1] for the 1st part
Split({HDRXXXXDEF.BIN_ID},"-")[2] for the 2nd
Split({HDRXXXXDEF.BIN_ID},"-")[3] for the 3rd
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
That is probably the easiest way

You can also use MID

Mid({HDRXXXXDEF.BIN_ID},3,2)

Mid({HDRXXXXDEF.BIN_ID},6)

mlmcc

Author

Commented:
Thanks that works perfect

Author

Commented:
For the 3rd group I actually need to pull out the 3rd character.  Example below

A-00-01a

A
00
01
a

Author

Commented:
never mind I figured it out

Mid({HDRXXXXDEF.BIN_ID},8)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial