How to parse data
We start with a cell(s) containing 13 to 15 characters, with no spaces:
1234567100AAAAA, 123456710AAAAA, 12345671AAAAA. We want the format to be 1234567-100-AAAAA, 1234567-10-AAAAA, 1234567-1-AAAAA. The first 7 characters always belong together, and the last 5 characters always belong together. It is the middle 1 -3 that varies. How can this be done? Thank you. |
How to parse data
Try this formula:-
=LEFT(A1,7)&"-"&MID(A1,8,LEN(A1)-12)&"-"&RIGHT(A1,5) Assumes your data starts in A1. Then copy down. "bdwood" wrote: We start with a cell(s) containing 13 to 15 characters, with no spaces: 1234567100AAAAA, 123456710AAAAA, 12345671AAAAA. We want the format to be 1234567-100-AAAAA, 1234567-10-AAAAA, 1234567-1-AAAAA. The first 7 characters always belong together, and the last 5 characters always belong together. It is the middle 1 -3 that varies. How can this be done? Thank you. |
All times are GMT +1. The time now is 02:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com