ssblue
asked on
Excel pull data between dashes
I need to be able to pull everything between the second and third dash in a list of items.
0-AP-LP-6001-CB-MB > result = LP
0-AP-MCC-6000 > result = MCC
0-AP-XFMR-6007 > result = XFMR
0-FA-5001A-B-6 > result = 5001A
0-AP-LP-6001-CB-MB > result = LP
0-AP-MCC-6000 > result = MCC
0-AP-XFMR-6007 > result = XFMR
0-FA-5001A-B-6 > result = 5001A
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!!
You're welcome!
Pleased to help
ASKER
Quick question - how would I modify this to pull the info between the first and second dash??
0-AP-LP-6001-CB-MB > result = AP
0-AP-MCC-6000 > result = AP
0-AP-XFMR-6007 > result = AP
0-FA-5001A-B-6 > result = FA
0-AP-LP-6001-CB-MB > result = AP
0-AP-MCC-6000 > result = AP
0-AP-XFMR-6007 > result = AP
0-FA-5001A-B-6 > result = FA
Remove the *2 from the formula.
=TRIM(MID(SUBSTITUTE(A2,"-",REPT(" ",LEN(A2))),LEN(A2),LEN(A2)))
ASKER
SWEET!! THANKS!
Welcome!
Split text into different columns with the Convert Text to Columns Wizard