i am trying to calculate: A random number in the range 10^25 mod a random number in the range of 100. I saved the first random number as a Variant because the number is too big to be saved as an Integer.
The result of the solution should be something between 1 and 100, so it could be saved as an Integer.
My idea is to break down the numbers into smaller numbers (prim factorisation) and calculate the modulo on smaller numbers, so we don't need to calculate in the range of 10^25.
For example calculation: 300400000717120000131495 mod 97 = 1 How to calc this by using VBA.
Thank you in advance. Fabian