Skip to content

Instantly share code, notes, and snippets.

View ncalm's full-sized avatar
💭
hitting computer with hammer

Owen Price ncalm

💭
hitting computer with hammer
View GitHub Profile
// --- Workbook module ---
// A file of name definitions of the form:
// name = definition;
// --- Workbook module ---
// Rows => ; Columns => ,
// arr, {a, b, c;
// d, e, f}
// Access row 1 => index(arr, , 1)
@jsb2505
jsb2505 / Geotech.txt
Last active October 3, 2023 10:03
A module of geotechnical related lambda functions.
/**Partial factor for action DA1 C1 or C2.
EXPECTED INPUTS:
Combination = 1 or 2.
Action = "permanent" or "variable".
Favourability = "unfavourable" or "favourable".
*/
Get_γ_action = LAMBDA(combination_1_or_2_as_number, action, [favourability],
LET(
_favourability, IF(ISOMITTED(favourability), "unfavourable", LOWER(favourability)),
_action, LOWER(action),
@ExcelRobot
ExcelRobot / mandelbrot.lambda
Last active May 4, 2024 08:27
Mandelbrot Lambda
/*
Name: Mandelbrot Set (Mandelbrot)
Description: Generates a Mandelbrot set based on given assumptions that can be used with conditional formatting to view the visual representation.
Parameters:
xleft - Left X value
xright - Right X value
ytop - Top Y value
ybottom - Bottom Y value
size - number of columns/rows in square output range
iterations - number of iterations
@ExcelRobot
ExcelRobot / CROSSJOIN.lambda
Last active February 18, 2024 09:46
Cross Join LAMBDA Function
/*
Name: Cross Join Two Arrays or Tables (CROSSJOIN)
Description: Returns all possible combinations of two arrays of data, with or without header rows.
If the arrays have only one row, it will be assumed that they are row vectors, otherwise it
assumes the arrays are columns of data.
Parameters:
array1 - first array of data with one or more columns
array2 - second array of data with one or more columns
[has_header_row] - true if the first row of the arrays contain a header row, default: false
Source: Excel Robot (@ExcelRobot)
@halbuki
halbuki / EXNAL
Last active September 1, 2022 14:41
Excel Lambda functions for numerical analyses
/* ROOTS OF FUNCTIONS */
BISEC = LAMBDA(f, lbound, ubound, [prec],
LET(
c, (lbound + ubound) / 2,
fl, f(lbound), fu, f(ubound), fc, f(c),
IF(
ABS(fc) < MAX(prec, 1E-15),
c,
IF(
SIGN(fl) = SIGN(fc),
@Bhavya2502
Bhavya2502 / Number_To_Words
Created August 9, 2022 13:17
Convert Very Large Numbers to Words for both Indian as well as International Numbers
/* Link to YouTube Video - https://www.youtube.com/watch?v=u1gzAcwmlpo*/
Number_To_Words = LAMBDA(Number, [Indian_or_InterN],
LET(
Option, IF(ISOMITTED(Indian_or_InterN), 1, Indian_or_InterN),
l, LEN(Number),
L_1, SEQUENCE(19),
R_1, VSTACK(
"One",
"Two",
@CHatmaker
CHatmaker / BXL LAMBDA Excel Dates.txt
Last active June 12, 2024 01:24
5g Functions for Excel: Dates
/* Module Contains 5g Compliant LAMBDAs that deal with dates */
/* FUNCTION NAME: Aboutλ
DESCRIPTION:*//**Displays the URL to this module's Gist which includes documentation*/
/* REVISIONS: Date Developer Description
Mar 17 2023 Craig Hatmaker Original Development
Mar 22 2023 Craig Hatmaker Added About
Apr 06 2023 Craig Hatmaker Added Help to LAMBDAs
Aug 28 2023 Craig Hatmaker Conformed to new template
Jan 02 2024 Craig Hatmaker See CountDOWλ
@ExcelRobot
ExcelRobot / UNPIVOT.lambda
Last active June 9, 2024 15:39
Unpivot Table LAMBDA Function
/*
Name: Unpivot Table (UNPIVOT)
Description: Given a table range with headers and array of header names, unpivots the
specified columns in place, optionally removing any blank entries.
Written By: Excel Robot (@ExcelRobot)
Category: Array
*/
UNPIVOT=LAMBDA(table,[columns_to_unpivot],[attribute_name],[value_name],[remove_blanks], LET(
_ColumnsToUnpivot, IF(
ISOMITTED(columns_to_unpivot),
@SergeiStPete
SergeiStPete / lambdaBasicFunctions.txt
Created April 23, 2022 12:18
Excel Lambda basic functions
/*
Partly taken from samples to AFE
https://github.com/microsoft/advanced-formula-environment
more exactly from
https://github.com/microsoft/advanced-formula-environment/blob/main/examples/Lib.md
*/
// ======================================================================================================
// Timing a computation wrapped in a thunk
@ExcelRobot
ExcelRobot / ADDTH.lambda
Last active December 21, 2023 14:59
Convert number to ordinal LAMBDA Function
/*
Name: Convert Number To Ordinal (ADDTH)
Description: Converts number to ordinal ie: 1st, 2nd, 3rd, 4th, 11th, 12th, 13th, 21st, etc.
Author: Excel Robot (@ExcelRobot)
Inspired By: Rick de Groot (https://www.linkedin.com/posts/rickmaurinus_powerbi-businessintelligence-dax-activity-6920723485937790976-Wzdb?utm_source=linkedin_share&utm_medium=member_desktop_web)
Category: Conversion
*/
ADDTH = LAMBDA(number,LET(
LastDigit, RIGHT(number),
LastTwo, RIGHT(number, 2),