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

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