I'm not exactly sure from your description whether I completely understand your situation, but here goes...
If your data is, for example in column "A", is as follows:
5,4,3,2,1
,4,3,2,1
, ,3,2,1
, , ,2,1
, , , ,1
...then the following formula will work: (place in column "B"
=IF(MID(A1,1,1)="5",5,IF(MID(A1,3,1)="4",4,IF(MID(A1,5,1)="3",3,IF(MID(A1,7,1)="2",2,IF(MID(A1,9,1)="1",1,""

))))
IF your numbers all have a "space" character before each one, then you will have to modify the formula - to increase the positions referred to by the "MID" function.
See how this fits. If you have any problem, please advise.
Regards, ...Dale Watson dwatson@bsi.gov.mb.ca