Skip to content

Instantly share code, notes, and snippets.

View Medohh2120's full-sized avatar

Medohh2120

View GitHub Profile
@Medohh2120
Medohh2120 / BypassNestes.lambda
Last active March 14, 2026 02:35
Versions of BYROW, BYCOL, MAP that can return nested arrays
/*
Name: BYROW⊟
Description: A high-performance version of BYROW that supports "Array of Arrays" (nested results).
[orient] logic to control the assembly of results:
(0) or Omitted: (Stacks each row result vertically).
(1) : (Stacks each row result horizontally).
Made By: Medohh2120
*/
BYROW⊟ = LAMBDA(array, function, [orient],
@Medohh2120
Medohh2120 / BENCHMARK.lambda
Last active March 14, 2026 02:47
BENCHMARK — Excel LAMBDA Performance Timer
/*
Name: BENCHMARK
Description: Runs a formula N iterations and returns avg & total execution time.
Func must be wrapped in LAMBDA() =BENCHMARK(LAMBDA(your_formula), 50)
[iterations] default: 1
[time_unit] default: 0 (ms), 1 = seconds
Made By: Medohh2120
*/
BENCHMARK = LAMBDA(Func, [iterations], [time_unit],
@Medohh2120
Medohh2120 / DynArray-ShapeShift.lambda
Last active March 12, 2026 11:34
Dynamic array transformation toolkit for Excel LAMBDA functions
/*
Name: REPLACE_VECTOR
Description: Replaces targeted rows and/or columns in an array with given "new_arrays".
If multiple indices are supplied per axis, the same "new_array" is placed at each target.
preserves the original order of the remaining rows/columns.
Optional "pad_with" replaces dimension-mismatch errors in the final result.
Made By: Medohh2120
*/
REPLACE_VECTOR = LAMBDA(array, [row_idxs], [new_row_array], [col_idxs], [new_col_array], [pad_with],
@Medohh2120
Medohh2120 / Repeat.lambda
Last active March 12, 2026 11:35
a High performance function that repeats a data range based on a frequency column
/*
Name: REPEAT
Recommended version: v2024 or 365
Description: Repeats a data range based on a frequency column.
Optimized with Binary Search.
Made By: Medohh2120
*/
Repeat = LAMBDA(Values,Number_times,
LET(
@Medohh2120
Medohh2120 / Textbetween.lambda
Last active February 28, 2026 00:11
Returns text between 2 delimiters
/*
Name: TEXTBETWEEN
Description: Returns text between delimiters.
- Standardized to native TEXTAFTER/BEFORE syntax.
- Supports Multi-input: Text (Rows) x Delimiters (Columns).
- Strict Mode: Assumes equal number of start/end delimiters.
Made By: Medohh2120
*/
TEXTBETWEEN = LAMBDA(text, start_delim, end_delim, [instance_start], [instance_end], [case_sensitive_start], [case_sensitive_end], [match_end_start], [match_end_end], [if_not_found],
@Medohh2120
Medohh2120 / Unpivot_Toolkit.lambda
Last active March 1, 2026 17:32
Wide" data into a "Long" database format
/*
Name: UNPIVOT_PLUS
Description: Given a table or a range with headers, Transforms "Wide" data into a "Long" database format.
V4 UPDATE: "pad_blanks_with" feature to replace empty grid cells (prevents Pivot Table type-errors).
Automatically handles merged cells (Fill-Down or Fill-Right logic).
optionally removing Grid blank entries.
optionally removing Grid errors.
Made By: Medohh2120
*/