If anyone’s interested in a version of this for Excel rather than Google Sheets, I made one at https://github.com/MicahChalmer/ai-transaction-categorizer-excel.
The code isn’t directly copied from @cps’s per se, but I did base the approach on it (and I let Claude code read it as it created the initial version of mine.)
My add-in uses a simpler approach to finding similar reference transactions: rather than doing any kind of text match in the add-in code, I just dump the reference transactions into one big list and tell the AI to figure out which ones are matches. The fact that this works for me reflects how fast the LLMs are making progress. This approach, while appealingly simple from a code perspective, does not work on the models that were the best available as of last February. Both gpt-4o-mini and gemini-2.0-flash fall on their face when tried in that way. But it does work on the newest ones released this month in April 2025 (gpt-4.1-mini for OpenAI, and the gemini-2.5-flash-preview-04-17 from Google.). Both of them mostly nail it!
Since I don’t prefer to have it update the description, I made that optional and off by default. Interested to hear if anyone else has a try with it.