Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #109986
| Newsgroups | microsoft.public.excel.programming |
|---|---|
| Date | 2017-04-10 11:04 -0700 |
| Message-ID | <672d43ea-8a3c-425c-9ff3-62a0e58aeb87@googlegroups.com> (permalink) |
| Subject | Excel and VBA calculate the same formula differently |
| From | Ottmar Brandau <apex@blowmolding.org> |
I have a strange phenomenon. In Excel the following expression: LN(8/PI()^2*280/125) equates to 0.596458. In VBA the code: Log(8/(4*Atn(1))^2*280/125 comes out to 0.554588, a difference of over 7%. I makes no difference to replace (4*Atn(1)) with 3.14, the difference is basically the same and it screws up my calculation. BTW, Log in VBA is the same as LN in Excel. Does somebody have an idea why this is and how to correct it? Thanks. Ottmar
Back to microsoft.public.excel.programming | Previous | Next — Next in thread | Find similar | Unroll thread
Excel and VBA calculate the same formula differently Ottmar Brandau <apex@blowmolding.org> - 2017-04-10 11:04 -0700
Re: Excel and VBA calculate the same formula differently GS <gs@v.invalid> - 2017-04-10 14:17 -0400
Re: Excel and VBA calculate the same formula differently "Auric__" <not.my.real@email.address> - 2017-04-10 19:58 +0000
Re: Excel and VBA calculate the same formula differently Ottmar Brandau <apex@blowmolding.org> - 2017-04-10 13:38 -0700
Re: Excel and VBA calculate the same formula differently "Auric__" <not.my.real@email.address> - 2017-04-11 06:09 +0000
Re: Excel and VBA calculate the same formula differently cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 02:35 +0100
Re: Excel and VBA calculate the same formula differently cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 06:39 +0100
Re: Excel and VBA calculate the same formula differently cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 14:10 +0100
Re: Excel and VBA calculate the same formula differently hoclaixenang <hoclaixenang@gmail.com> - 2017-04-12 16:46 +0100
Re: Excel and VBA calculate the same formula differently cacuoc334465c <cacu123oc365a@gmail.com> - 2017-04-12 16:10 +0100
csiph-web