Need Fast help pls... Format issue!

  • Thread starter Thread starter Ali Eghtebas
  • Start date Start date
A

Ali Eghtebas

Hi,

Need fast help pls:

Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?

I need to use Format, otherwise it will be a time consuming work to process
0 in a If of some kind.
 
Ali Eghtebas said:
Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?


Format (0, "###,##0.00")
 
Hi Ali, Jochen,

As Jochen demonstrated, you need a zero in every position where
you require a digit. The '#' in the format specification says 'put a digit
here if the value requires it but if not use a space'. The '0' specifies
either the number's digit or a zero.

So "###,###.##" means give me nothing if the number is zero.

Also, if you want your decimal places, you'd use "###.##0.00"

Regards,
Fergus
 
Ali,
# = Space
if you woud want a "0", u shud format it as
format (0,###,##0.##) this would give a zero.

Hope this suffice.

Ajay
 
* Ali Eghtebas said:
Need fast help pls:

Format (1 "###,###.##") = "1" <<<<----- OK!

Format (0, "###,###.##") = "" <<<<----- WHY?

How can I make this work with Zero?

Try this (untested): 'Format(0, "###,##0.##")'.
 
Back
Top