I'm using the Format function ( http://msdn.microsoft.com/en-us/library/59bz1f0h%28v=vs.90%29.aspx ) to format my output. Currently I use this format string:
TestStr1 = Format(5459.4, "##,##0.00")
TestStr2 = Format(0.4, "##,##0.00")
TestStr3 = Format(0.0, "##,##0.00")
The above code will return "5,459.40", "0.4" and "0.00" respectively. Now, if the value is equal to zero, I want to display "-" instead. How can I achieve that output without using if-else statement, just Format function?
Edit:
Aside from Pranay's article here I found an article from Microsoft, it's on the bottom part. http://msdn.microsoft.com/en-us/library/0c899ak8.aspx