View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Spilting 1 cells contents into 5 columns over an entry of 1 to five characters

If it's 5 digit figures (numbers) only in A1 down, think we could try in B1:

=IF(MID(TEXT($A1,"00000"),COLUMN(A1),1)="0","",MID (TEXT($A1,"00000"),COLUMN(
A1),1)+0)

Copy B1 across to F1, fill down
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Michael" wrote in message
...
Can you guide me please

I have one cell that will hve anything up to a 5 digit number in this, I
what to place the respective digit in to separate columns

ie.
If I enter ABCDE in the receiving cell, I use the MID(Cell,3,1) which will
return me the C

A | B | C | D | E
| F |
1 |ABCDE| A | B | C | D |
E |

Which is acheived with
Cell B1 =MID($A$1,1,1)
Cell C1 =MID($A$1,2,1)
Cell D1 =MID($A$1,3,1)
Cell E1 =MID($A$1,4,1)
Cell F1 =MID($A$1,5,1)

Gets me the result I want when the figure is five digits long

However when I only have a four digit result say BCDE

the result is as follows

A | B | C | D | E
| F |
1 |BCDE | B | C | D | E |
|

I need to display it

A | B | C | D | E
| F |
1 |BCDE | | B | C | D |
E |

Hope this is clear

TIH

Michael