This is because you have multiple MATLAB versions installed on your machine. To have Excel use your current version of MATLAB, do the following:
1. Shut down Excel.
2. Start MATLAB as an Administrator (by right clicking and selecting "Run as Administrator" and execute the following at the command prompt:
>> !matlab /regserver
/regserver allows you to manually register MATLAB as a COM server. This will launch a new MATLAB command window.
3. Start Excel and re-run the your function.