It really is amazing what you can do with an Excel user-defined function (UDF). Here is a list (not comprehensive) of articles from my website that demonstrate clever and unusual uses of UDFs.
https://dhexcel1.wordpress.com/2017/06/07/excel-exchange-rate-udf-with-symbol-lookup-by-david-hager/
https://dhexcel1.wordpress.com/2017/06/03/creating-an-excel-translator-by-david-hager/
In this article, I will show how to use an Excel UDF to return a delimited string of antonyms. It uses Word VBA, so in order for the code to work, you must add a reference to the Microsoft Word Object library in the VBE, as shown below.
Then, the following code for the UDF can be placed in a general module in the VBE.
Function AllAntonyms(TheWord As String)
Dim Alist
Alist = SynonymInfo(Word:=TheWord, LanguageID:=wdEnglishUS).AntonymList
For i = 1 To UBound(Alist)
If i = UBound(Alist) Then
DList = DList & Alist(i)
Else
DList = DList & Alist(i) & “,”
End If
Next
AllAntonyms = DList
End Function
The result for using this UDF in a worksheet cell with the word “excited” as the lookup for antonyms in shown in the following figure.
There are a number of possibilties for extending/modifying this example to other useful UDFs. I hope that you find this useful in that regard.
You can download the workbook here.