Checking if the number is decimal

kpark91

Well-known Member
Joined
Jul 15, 2010
Messages
1,582
Hello, I come with another programming question D:

I've been trying to solve Problem 3 of Project Euler with VBA and because I'm still a learner in every programming aspects. If either of these two questions are answered, it would mean ALOT to me :)

In VBA or any programming languages, when we're using Mod, the numbers have to be low enough to actually perform the function. (and they also need to be integers).

However, my number is too high and it cannot be converted to integers because of overflow. (1) So, is there such a function in VBA that allows me to find the remainder between the two doubles?

As far as I'm concerned, VBA does not have it or any other programming languages. So, this leads to my second question.

(2) How do I check if a double is a decimal number?


Thank you in advance!
kpark
 
From Help:

Int, Fix Functions

Returns the integer portion of a number.
Syntax
Int(number)
Fix(number)
The required number argument is a Double or any valid numeric expression. If number contains Null, Null is returned.

It returns the same data type (Byte, Integer, Long, Single, Double) as its argument, or a Double for a numeric string.
 
Last edited:
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,224,590
Messages
6,179,753
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top