How to parse data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Try this formula:-

=LEFT(A1,7)&"-"&MID(A1,8,LEN(A1)-12)&"-"&RIGHT(A1,5)

Assumes your data starts in A1. Then copy down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top