View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Alan Alan is offline
external usenet poster
 
Posts: 492
Default number formatting help

You're right there, nothing like that long. I think I understand it now how
it works with yours and David's replies. As I said, very ingenious and one
to note for future reference,
Thanks,
Alan.
"Dave Peterson" wrote in message
...
And the +1 moves one character to the right of the hyphen.

And the 255 was just a big enough number to retrieve a bunch of
characters. I'm
betting that your strings don't approach that length!

Alan wrote:

Hi Dave,
Good one but could you please explain how that works? I know it does as I
tried it but I don't understand how it removes any number of leading
zero's.
It has to be the +1,255 that does it, but how?
Regards,
Alan.
"Dave Peterson" wrote in message
...
Do you want to convert 123456-0012 to 123456.12?

As text:
=IF(A1<0,LEFT(A1,FIND("-",A1)-1)&"."&--(MID(A1,FIND("-",A1)+1,255)))



dysart316 wrote:

How can I ignore the 0 if there are 2 after the hyphen. Ex 123.0012

--

Dave Peterson


--

Dave Peterson