📄Working with Random Values in MS Excel and Python
Python does not work well with random values generated using Rand() function in MS Excel.
As you can see in the above example, in cell A1 a value is entered which is multiplied by 2 in cell B1 using Python, and you can see the answer which is 1.0887. However, same python code is used in cell B2 to multiply value in A2 with 2, but this code will lead to an error.
So, be careful while using Rand function, with Python, in MS Excel. If you are facing #CALC! error, look for any random value, and paste it as special to get rid of this error, or use another method to generate random values.