Need help with Excel COM Interface precision

Advanced Macro Recorder/Editor.

Moderator: Pulover

terenceck
Posts: 3
Joined: 10 Sep 2019, 02:16

Need help with Excel COM Interface precision

24 Sep 2023, 22:05

Using Excel COM Interface to receive an excel cell "G20" with value of 0.932835820895522. But the result I got is 0.9328356.

The Excel COM command using to retreive is "xl.Range("G20").Text"
rockitdontstopit
Posts: 74
Joined: 12 Nov 2022, 15:47

Re: Need help with Excel COM Interface precision

19 Oct 2023, 09:49

terenceck wrote:
24 Sep 2023, 22:05
The Excel COM command using to retreive is "xl.Range("G20").Text"
Use the command "xl.Range("G20").Value" instead of text. Even if the cell contents is a formula "Value" will grab the number value.

Actually, I think you need to use the format function to display 15 decimals. String := Format(FormatStr , Values...)

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 113 guests