Regex extract
>Suggested built-in function: =text.RegexMatch(text, pattern)Extracts text matching a regular expression pattern.โ Added
Input
| A | |
|---|---|
| 1 | Call me on 555-1234 or 555-5678 |
Output
| B | C | |
|---|---|---|
| 1 | 555-1234 | 555-5678 |
Complex formulas to simple code
>AI-generated function: =sales.Commission(amount)Tiered commission: 5% up to 10k, 8% up to 50k, 12% above.โ Added
Before
| =IF(A1<=10000,A1*0.05,IF(A1<=50000,10000*0.05+(A1-10000)*0.08,10000*0.05+40000*0.08+(A1-50000)*0.12)) | ||
|---|---|---|
After
| =sales.Commission(A1) | ||
|---|---|---|
Input
| A | |
|---|---|
| 1 | 75000 |
Output
| B | |
|---|---|
| 1 | 6700 |
Turn unreadable formulas into simple code you can name, document, and reuse.
View generated code
xllify.fn({
name = "sales.Commission",
description = "Calculates tiered commission based on sales amount",
category = "Sales"
}, function(amount)
if amount <= 10000 then
return amount * 0.05
elseif amount <= 50000 then
return 10000 * 0.05 + (amount - 10000) * 0.08
else
return 10000 * 0.05 + 40000 * 0.08 + (amount - 50000) * 0.12
end
end)
Join orders with customers
>Suggested built-in function: =data.Join(range1, range2, key)Joins two ranges on a shared key column.โ Added
Input (orders)
| A | B | C | |
|---|---|---|---|
| 1 | order_id | customer_id | amount |
| 2 | 1001 | C1 | 250 |
| 3 | 1002 | C2 | 180 |
| 4 | 1003 | C1 | 340 |
Input (customers)
| E | F | G | |
|---|---|---|---|
| 1 | customer_id | name | region |
| 2 | C1 | Acme Corp | North |
| 3 | C2 | Globex | South |
Output
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 1001 | C1 | 250 | Acme Corp | North |
| 2 | 1002 | C2 | 180 | Globex | South |
| 3 | 1003 | C1 | 340 | Acme Corp | North |
Ready-made functions or fresh code on demand
>AI-generated function: =acme.LeadScore(company_size, industry, days_since_contact)Scores lead quality from 0-100 based on company attributes and engagement recency.I can make mistakes โ double-check the codeโ Added
Input
| A | B | C | |
|---|---|---|---|
| 1 | 500 | SaaS | 3 |
| 2 | 50 | Retail | 45 |
Output
| D | |
|---|---|
| 1 | 92 |
| 2 | 34 |
View generated code
xllify.fn({
name = "acme.LeadScore",
description = "Scores lead quality from 0-100",
category = "Acme"
}, function(company_size, industry, days_since_contact)
local score = 50
-- Company size scoring
if company_size >= 1000 then
score = score + 30
elseif company_size >= 100 then
score = score + 20
elseif company_size = 10 then
score = score + 10
end
-- Industry scoring
local hot = {SaaS = 25, Fintech = 20, Healthcare = 15}
score = score + (hot[industry] or 0)
-- Recency penalty
if days_since_contact > 30 then
score = score - 20
elseif days_since_contact > 14 then
score = score - 10
end
return math.max(0, math.min(100, score))
end)
See it in action
xllify includes an open-source standard library covering many common scenarios. The agent uses this where possible, otherwise it writes the code for you. You can customize the result with further prompts or by hand.
Advanced users can inspect and tweak the code, name, and docs at will. Your code, workbooks and data stay on your machine. WASM (for web, Mac) and XLL builds supported.
XLL is Windows-only but allows multi-threaded calculation for superior performance via the C SDK. It can handle much larger ranges without issue.