Please make sure VBA is enabled for Office on your machine.
When you enable Analysis ToolPak add-in, please click browser, and find the ANALYS32.DLL file. The example path for 64-bit version is
C:\Program Files\Microsoft Office\root\Office16\Library\Analysis. If the file does not exist, it is recommended that you copy the file from another computer to this directory.
If nothing helps, I suggest you perform an Online Repair for Office from Control Panel.
You may also create a new Windows account, and run Excel in this new account to check this issue.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.