You can add a local "=AI" formula in Excel
Excel can then process data using a free and open-source AI model like Gemma.
This means that it understands what's in the cells and returns a tailored response based on your prompt even offline.
Steps to set it up and examples below
Keep in mind that everything runs locally, even the AI model (LLM): no remote servers or APIs!
EXAMPLE 1 - Categorize data
Formula:
=AI("Is this a basketball or baseball team? Just write one word: Basketball or Baseball. Team name: ",A1)
EXAMPLE 2 - Sentiment analysis
Formula:
=AI("Is this sentence negative or positive? Just write one word: Positive or Negative. The sentence is: '",A1,"'")
And you can do much more like data extraction, summarizing, etc.!
Tutorial ↓
1. Run the AI model locally
- Download and install LM Studio for your OS:
- In the search tab type "gemma-3n-4B" and download the Unsloth version (Q4_0)
- Load the model in the dev tab and activate the local server lmstudio.ai
2. Excel settings
- Open Excel and press Alt + F11
- Click on Insert then Module and paste this code:
- Open Tools then References and in the list check Microsoft XML, v6.0 docs.google.com/document/d/e/2…
You can now use the "=AI" formula anywhere in your spreadsheet:
- 100% free
- 100% private
And of course, you can also host the model on any local machine and access it remotely if you want to!
Feel free to ask any question below (and follow if it was useful to you!)
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.