Number format using TEXT( ) function
On Mon, 30 Apr 2007 22:00:04 -0400, "T. Valko" wrote:
Hi Folks!
Using the TEXT() function, what format do I need to get:
$10
$10.50
$110.99
$1,110.99
Integers should remain integers but it should also handle decimals.
I tried $#,### which works fine on intergers but not on the decimals. Then I
tried $#,###.## which works fine on the decimals but not the integers.
Thanks
Biff
=TEXT(A8,IF(A8=INT(A8),"$#,###","$#,###.00"))
However,
=DOLLAR(A8,2*(A8<INT(A8)))
gives the same result -- a dollar formatted text string with the desired
decimal, non-decimal formatting.
--ron
|