View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Four digit numbers need to be split up

On Fri, 1 Oct 2004 10:34:14 -0500, hyyfte
wrote:


=mid is not working because I have a decimal point between the numbers.


here's a better example:

Cell AO11 = 13.00
I want:
AJ11 = 1
AK11 = 3
AM11 = 0
AN11 = 0

My problem is to 0 is coming up as a blank cell instead of showing the
zero. Is there any way to show the zero?


These should work for both of your examples, and others I could think of with
similar formats:

=LEFT(SUBSTITUTE(TEXT(AO11,"0.0000"),".",""),1)
=MID(SUBSTITUTE(TEXT(AO11,"0.0000"),".",""),2,1)
=MID(SUBSTITUTE(TEXT(AO11,"0.0000"),".",""),3,1)
=MID(SUBSTITUTE(TEXT(AO11,"0.0000"),".",""),4,1)



--ron