Forum Discussion
SteveDatz
Mar 14, 2022Copper Contributor
How to change max number of VBA function
Hello I wrote a custom function in excel,
but when I use large numbers (250,000) it comes back as #=NUM!
Only relevant info I found seems to be here:
https://support.microsoft.com/en-us/office/how-to-correct-a-num-error-f5193bfc-4400-43f4-88c4-8e1dcca0428b
Yet I have absolutely no idea how or where to do that.
Clicking on "show calculations steps" just shows me this.
I tried changing from an INTEGER to a DOUBLE, but 250,000 should clearly fit inside of an integer.. so im really confused
The range of Integer is -32768 to +32767.
Use Double or Currency for BaseCost, and Long for NumOwned.
3 Replies
Sort By
The range of Integer is -32768 to +32767.
Use Double or Currency for BaseCost, and Long for NumOwned.
- SteveDatzCopper ContributorOkay interesting, thanks so Integer, double, long etc.. in excel is not even close to what it is in other programming languages ?? for example in C# an int is = 2,147,483,647
That is correct. See Data type summary