[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Formatting a number with decimals



Hi Maria,

About the only thing you can do to "trick" excel into not ignoring the 
zero trailing digits is to convert it to a text string (instead of sending 
36,123.000, send ="36,123.000").  One drawback to this approach is that 
excel handles the number as text instead of a number (left justified 
instead of right justified).  We use this when we send emplids or SSNs to 
excel, and we obviously don't need to process them as numbers.

If you want to keep your numbers as numbers in excel (in case you need to 
perform any math functions), then you are better off leaving as is, and 
then doing the format cell thing.

Hope this helps,
Don


sqr-users-bounces+don.barclay=srs.gov@sqrug.org wrote on 10/21/2004 
02:51:20 PM:

> I'm trying to format a number that is written out to a file that is
> opened up in Excel. When I do the follwoing string:
> 
> string $CliAcctNum $LastName $FirstName $Address1 $City1 $State1
> $Postal1 
>         $SSN  $Phone $Balance $Address2 $City2 $State2 $Postal2 by
> $Format into $Output_Row
> 
> I want it to include zeros after the decimal point for the variable
> $Balance if it is an even number. I have tried Let $Balance =
> edit($Balance,'99,999.99') but it still is not bringing in the zeros
> after the decimal point. If there are other numbers after the decimal
> point it brings in those, but not if it is just zero. Is this possible
> at all? Or do I need to tell the user that they will just have to do the
> Format Cell thing after running this file to excel?
> 
> Any suggestions would be greatly appreciated.
> 
> Thanks!

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users