Start Excel, click on the Office button, choose "Popular" and check "Show Developer tab in the Ribbon".
Open Visual Basic by going to the first option on the developer tab on the Ribbon.
Add this piece of code by choosing Insert->Module. Copy this code into your Excel VBA module
Option Explicit 'Excel VBA Function to call the AphiaNameService Public Function getAphiaID(ScientificName As String) As Single Dim objSClient As SoapClient30 Dim AphiaID As Single Set objSClient = New SoapClient30 Call objSClient.MSSoapInit(par_WSDLFile:="https://ras.biodiversity.aq/aphia.php?p=soap&wsdl=1") 'Call the web service AphiaID = objSClient.getAphiaID(ScientificName, True) Set objSClient = Nothing getAphiaID = AphiaID End Function
Close the VB Editor.
You can now use the function getAphiaID as you would any built-in Excel function.
Select the cell you want the value displayed in, then go to the Insert menu and choose Function.
In the Paste Function dialog box, scroll down to User Defined functions and you should see getAphiaID listed:
The result should be something like this: