473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Need Fast help pls... Format issue!

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.
--
Thanks in advance
Ali Eghtebas Sweden
Jul 21 '05 #1
6 1230
Ali Eghtebas wrote:
Format (1 "###,###.##") = "1" <<<<----- OK!

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

How can I make this work with Zero?

Format (0, "###,##0.##") = "1"
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Jul 21 '05 #2
"Ali Eghtebas" <al***@home.se> schrieb

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

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

How can I make this work with Zero?

Format (0, "###,##0.00")
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Jul 21 '05 #3
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
Jul 21 '05 #4
rcb
Format(0, "###,###.##,##0;;\0")
Jul 21 '05 #5
Thank you all for the quick replies. I really appreciate it!

--
Regards
Ali Eghtebas Sweden
Jul 21 '05 #6
* Ali Eghtebas schrieb:
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.##")'.

--
Herfried K. Wagner
Microsoft MVP
<http://www.mvps.org/dotnet>

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: G.Esmeijer | last post by:
Friends, I would like to read a text file (fixed length formaated) really fast and store the data into an Access database (2003). Using the streamreader and reading line by line, separating the...
6
by: Ali Eghtebas | last post by:
Hi, Need fast help pls: Format (1 "###,###.##") = "1" <<<<----- OK! Format (0, "###,###.##") = "" <<<<----- WHY? How can I make this work with Zero?
6
by: Ali Eghtebas | last post by:
Hi, Need fast help pls: Format (1 "###,###.##") = "1" <<<<----- OK! Format (0, "###,###.##") = "" <<<<----- WHY? How can I make this work with Zero?
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.