Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting data from one cell into three cells 1

Status
Not open for further replies.

ijes

Technical User
May 31, 2002
2
0
0
GB
I wish to split the contents of one cell into 3 cells as follows;
Cell A1 contains (15 digits)
I wish to put the first 7 digits into B1 =left(a1,7) last 3 digits in D1 =right(A1,3) how do I put digits 8 to 12 (5 digits) into cell C1?
I know I could put the contents of A1 less the last three digits into another cell and return Right 5. Is there another way referencing only cell A1?

Ian
 
Hi, Ian!

There is also the MID function that lets you extract a string in the middle of another string.

in your case it would be

=MID(A1,8,5)

Hope that helps.

Indu
 
Hi Ijes,

I see you've already got your answer, but you can also use a combination of left and right statements that works.

=left(right(a1,8),5)

Just another way, as I was unfamiliar with the =mid function, I had to improvise.

Scott

 
or you could use text to columns (data menu), selecting fixed width option
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top