Skip to content

Instantly share code, notes, and snippets.

View ExcelRobot's full-sized avatar

Excel Robot ExcelRobot

View GitHub Profile
@ExcelRobot
ExcelRobot / NoExamples.lambda
Last active April 29, 2024 06:13
MEWC No Examples Lambda
/*
Name: No Examples (NoExamples)
Description: Given the used range of a MEWC (Microsoft Excel World Championship) Case sheet, returns just the game numbers, levels, and game data excluding any example data.
Parameters:
used_range - Reference to all used cells on Case sheet.
Source: Excel Robot (@ExcelRobot)
*/
NoExamples =LAMBDA(used_range, LET(
\\LambdaName, "NoExamples",
\\CommandName, "No Examples",
@ExcelRobot
ExcelRobot / RGBtoColorName.lambda
Created March 7, 2024 03:11
Convert RGB To Color Name Lambda
/*
Name: Convert RGB to Color Name (RGBtoColorName)
Description: Converts RGB integers to nearest color name in a table of 139 colors.
Parameters:
r - Red RGB Integer
g - Green RGB Integer
b - Blue RGB Integer
Source: Written By Excel Robot (@ExcelRobot), converted from https://gist.github.com/XiaoxiaoLi/8031146
*/
RGBtoColorName =LAMBDA(r, g, b, LET(
@ExcelRobot
ExcelRobot / TLOOKUP.lambda
Last active March 3, 2024 19:02
Two-Way Table Lookup LAMBDA Function
/*
Name: Two Way Table Lookup (TLOOKUP)
Description: Looks up values in a table by values in first column and first row. Accepts arrays of column/row values or if omitted will return all columns/rows.
Parameters:
table - range or array that includes headers in first row and column
[row_values] - value or array of values to lookup in first column; returns all rows if omitted
[column_values] - value or array of values to lookup in first row; returns all columns if omitted
Source: Excel Robot (@ExcelRobot)
*/
TLOOKUP =LAMBDA(table, [row_values], [column_values], LET(
@ExcelRobot
ExcelRobot / FormatFormula.lambda
Last active September 1, 2023 01:34
Format Formula LAMBDA Function
/*
Name: Format Formula (FormatFormula)
Description: Uses OA Robot formula formatting api to format a formula to make it easier to read.
Parameters:
CellOrFormula - Reference to cell containing a formula or a formula as text
Compact - True to remove all whitespace (default: False)
Source: @ExcelRobot, https://www.oarobot.com
*/
FormatFormula = LAMBDA(CellOrFormula, [Compact], LET(
\\LambdaName, "FormatFormula",
@ExcelRobot
ExcelRobot / HarveyBalls.lambda
Last active June 26, 2023 13:37
Harvey Balls Lambda
=LAMBDA(percent,[color],LET(
baseurl,"",
IMAGE(baseurl&IF(ISOMITTED(color),"Black",color)&TEXT(percent,"0")&".png")
))
@ExcelRobot
ExcelRobot / multi-level data validation.lambda
Last active January 19, 2024 05:48
Multi-Level Data Validation LAMBDAS
/*
Name: Multi-Level Dropdown Validation (MultiLevelDropdownValidation)
Description: Returns the list of allowable values for a specific cell based on
the entries to the left.
Parameters:
tablename - name of the Excel table containing the data validation dropdowns.
header - table header cells from the first column with data validation to the column for which
to return list of values allowed.
keylisttable - reference to dynamic range containing the MultiLevelKeyLists lambda key lists table.
Source: Written by Excel Robot, inspired by Wyn Hopkins (https://www.youtube.com/watch?v=r0DTFodQYJQ&t=989s)
@ExcelRobot
ExcelRobot / TILE.lambda
Last active May 1, 2024 18:28
TILE Lambda
/*
Name: Tile (TILE)
Description: Tile the outputs of a single-parameter function given an array map of parameters.
Parameters:
params - array of parameters arranged how function results to be tiled
function - single-parameter Lambda name or function
Source: Excel Robot (@ExcelRobot), but inspired by Owen Price's STACKER lambda (https://www.youtube.com/watch?v=wEBLT9QfQRw).
*/
TILE = LAMBDA(params,function,LET(
firstrow, function(INDEX(params,1,1)),
@ExcelRobot
ExcelRobot / mandelbrot.lambda
Last active November 30, 2022 20:53
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)
@ExcelRobot
ExcelRobot / IndexWrap.lambda
Last active October 6, 2022 19:28
Index Wrap LAMBDA Function
/*
Name: Index Wrap (IndexWrap)
Description: Similar to INDEX but if the position is too high, it'll wrap around.
Parameters:
array - Required. A range of cells or an array constant.
index - Required. The row (or column) position to return from array. If the position is greater than the number of rows (or columns), it wraps around.
[by_column] - Optional. True for columns, false for rows. Default: False.
Source: Excel Robot (@ExcelRobot)
Gist URL: https://gist.github.com/ExcelRobot/926df8b9889b39dc92549495a3144860
Dependencies: