Skip to content

Instantly share code, notes, and snippets.

View red-peel's full-sized avatar

Elias Gonzalez red-peel

  • 02:33 (UTC -05:00)
View GitHub Profile
@red-peel
red-peel / libertyFunctions.txt
Last active October 27, 2025 18:03
Excel functions used for work.
// --- Workbook module ---
// Changes the state to its abbreviation.
abbreviateState = LAMBDA(state,SWITCH(
state,
"Alabama", "AL",
"Alaska", "AK",
"Arizona", "AZ",
"Arkansas", "AR",
"California", "CA",
// video explaining all these formulas: https://youtu.be/yO8zX_Ivcug
// see video: https://youtu.be/P8knGhzV7uk
ListTable = LAMBDA(array,
LET(one,TAKE(array,,1),two,TAKE(array,,-1),
list,UNIQUE(one),
HSTACK(list,BYROW(list,LAMBDA(x,TEXTJOIN(", ",TRUE,FILTER(two,one=x)))))));
// see video: https://youtu.be/lli7MTilTB8
repeatXtimes = LAMBDA(array,num_repeat,