On 9/12/07, Peter Cushing wrote:
> Hi Garry,
>
> Just tried recording a macro and did 2  decimal places and show thousand
> character which produced
>
>    Selection.NumberFormat = "#,##0.00"
>
>
> Try getting the format you want in excel and make sure you record it so
> you can get the code.  What format do you want?
>
> Peter

Hi Peter,

Thanks for your reply.  I did run a macro in Excel and it said:

Selection.NumberFormat = "0.00000"

I'd like to get Excel to return the Linest of my test terms with only
a maximum of 5 decimals.

> lcLinest = [12.5,13,14]
> lcLinest = [12.5,13,12.5,12,13,12.5,13,12.5,12,12.5,13]

The Linest for the first 3 terms should be 0.75000

The Linest for the second 11 terms should be 0.00000

But, as I'm unable to get .NumberFormat to work correctly they return:

0.7500000000 and
0.0000000000

What's worse, in Excel 2007 - the above results are from Excel 2003 -
the results  returned are:

0.7500000000 and
-1.665427119678250E-32

Obviously, the last makes any further processing in VFP unattainable.

I just want Excel to return at most 5 decimals.

Cheers,

Garry


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to