Account
λ Lambdas

Community lambdas.

Copyable definitions. Tested. Tagged. Star the ones you use.

REGEX.CAPTURE (text, pattern, [group])
Capture a named regex group from a cell. Returns #N/A on no match, never the input.
text
★ 1,204 · @j.kwon
TEXT.JSON.PARSE (json, [path])
Parse a JSON string. Optional JSONPath ($..items[*].name). Returns spilled array.
text
★ 761 · @p.argo
DATE.WORKDAYS (start, end, [holidays])
Working-day count excluding weekends and an optional holidays range. Inclusive of both endpoints.
date
★ 643 · @m.patel
TEXT.SLUGIFY (s, [sep])
Lowercase, strip diacritics, replace non-alnum with the separator. Useful for stable keys.
text
★ 521 · @r.dietz
PIVOT.CAST (table, rows, cols, value, [agg])
Pivot a long table to wide. agg defaults to SUM.
reshape
★ 488 · @j.kwon
PIVOT.MELT (table, id_cols)
Unpivot a wide table into a tall one. Keeps id columns, melts everything else into name/value rows.
reshapearray
★ 412 · @a.morton
STATS.QUANTILE (data, p, [method])
Interpolated quantile using a configurable method (linear, lower, higher, midpoint).
stats
★ 359 · @a.morton
IRR.BISECT (cashflows, [guess])
Internal rate of return via bisection — more stable than the native IRR for irregular flows.
financestats
★ 298 · @s.lin
SIM.MONTECARLO (n, fn)
Run n samples of a parameterless lambda, return the array of results.
simulationstats
★ 232 · @l.cha
STATS.ZSCORE (data)
Z-score normalize a 1D array. Skips empty cells.
stats
★ 209 · @k.ito
GEO.HAVERSINE (lat1, lon1, lat2, lon2)
Great-circle distance in km between two lat/lon pairs.
geofinance
★ 174 · @k.ito
BYROW.IF (array, predicate)
Filter rows of a 2D array using a row-wise lambda. Equivalent to BYROW + FILTER, but eager.
array
★ 87 · @d.howe