Hello Bach Nguyen2
Thank you for posting in Microsoft Community.
I understand that you have an issue running a formula in Python for Excel. Let’s work together in finding the best resolution to this issue.
For me to better understand the issue, I’d like to ask a few questions:
- What is the version of your Excel app?
To solve this problem, you can try the following steps:
- Make sure that you have installed the correct version of Python that is compatible with Excel. You can check the compatibility of Python with Excel on the Microsoft website.
- Check if the Python add-in is enabled in Excel. To do this, go to the File menu, click on Options, and then click on Add-ins. Look for the Python add-in and make sure it is enabled.
- Check if the Python script is correctly written and saved in the correct location. The script should be saved in the same folder as the Excel file or in a folder that is accessible to Excel.
- Check if the Excel file is saved in a location that is accessible to Python. If the file is saved in a OneDrive folder, make sure that the OneDrive app is installed and running on your computer.
Please be reminded that Python for Excel still under preview version. You will be expecting some difficulties of using it or you may encounter some error messages. In this case, I would recommend to report the problem using the link below. Our internal team will review it for you. They will formulate feasible ways in the near future to correct the problem.
Click here: Open-source libraries and Python in Excel - Microsoft Support
Hope you understand.
We look forward to your next response.
Regards,
Jason Guer
Microsoft Community Moderator