Splitting data within cells

S

sedm1000

Ok, maybe a foolish question, but hopefully someone out there can answe
it...is it possible to separate data from within a cell? I need t
separate 2,3 and 4 digit numbers into their component numbers, i.e
"18" to "1 8", "118" to "1 18" and "1118" to "11 18".

Any help would be much appreciated
 
F

Frank Kabel

Hi
where do you want to store the result. In a separate helper column. If
yes you may use the following (lets say in B1):
=LEFT(A1,INT(LEN(A1)/2)) & " " & RIGHT(A1,LEN(A1)-INT(LEN(A1)/2))
copy this down
 
J

JE McGimpsey

Is this just for display within the cell?

In that case choose Format/Cells/Number/Custom:

[<100]# 0;[<1000]0 00;00 00;@


If you need the numbers separated into separate cells, you can use
Data/Text to Columns (sort the numbers first, then do all 2-digit, all
3-digit, etc).
 
S

sedm1000

Many thanks for the quick replies. Frank`s method works fine as I nee
to preserve the row order, hence dont want to sort the data. That`
probably saved me 5 hours work.:
 

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

Top