// code generator

Describe your formula, get the code.

Excel, Sheets, SQL and Python generated from one plain-English sentence. Paste it into your sheet and the cell fills itself.

3 free generations left today

Example requests

How to use the FormulAI generator

FormulAI turns a sentence into an Excel or Google Sheets formula, an SQL query or a Python script. Here is the method that gives the best results.

Use the tool in 3 steps

  1. Pick the language: Excel / Sheets, SQL or Python. The choice changes the generated syntax (separators, available functions).
  2. Describe what you need in one or two sentences and name your real columns or cells: "column C holds the amounts, column B the dates". The more precise the description, the less you will have to fix.
  3. Copy the result, read the explanation, then test it on a few rows before applying it to the whole file.

4 example requests and results

Request: Sum the amounts in column C when column A is "North" and column B is "Paid".

=SUMIFS(C:C,A:A,"North",B:B,"Paid")

SUMIFS adds up column C only on rows that meet both criteria at the same time.

Request: Show the price of the product whose SKU is in A2, looking it up in the Products sheet.

=XLOOKUP(A2,Products!A:A,Products!D:D,"Not found")

XLOOKUP searches A2 in column A of Products and returns the value from column D; "Not found" replaces the #N/A error.

Request: List the 5 customers who spent the most in 2025, table orders (customer_id, amount, created_at).

SELECT customer_id, SUM(amount) AS total
FROM orders
WHERE created_at >= '2025-01-01' AND created_at < '2026-01-01'
GROUP BY customer_id
ORDER BY total DESC
LIMIT 5;

The query filters the year with an index-friendly range, totals per customer, then keeps the top 5.

Request: Remove duplicate rows from sales.xlsx based on the email column and save it.

import pandas as pd
df = pd.read_excel("sales.xlsx")
df = df.drop_duplicates(subset=["email"])
df.to_excel("sales_deduplicated.xlsx", index=False)

pandas reads the file, keeps the first row for each email and writes a new file without touching the original.

Limits of the tool

  • Always check the result: the AI can pick the wrong column, misread an ambiguous sentence or suggest a function your Excel version does not have.
  • Never paste sensitive data: customer names, emails, salaries, passwords or health data. Describe the structure of the file, not its content.
  • For an SQL query that changes data (UPDATE, DELETE), test it first on a copy or inside a transaction.

Related guides