Skip to content

Instantly share code, notes, and snippets.

View ExcelRobot's full-sized avatar

Excel Robot ExcelRobot

View GitHub Profile
//ListOfTextMatches------------------
// Select a word to look for and a column to look in
//outputs filtered list containing that text
ListOfTextMatches=
LAMBDA(
SelectTextToLookFor,
SelectRangeToLookIn,
LET(
FlagMatch,
ISNUMBER(
@Softwaretrain
Softwaretrain / gist:c5e59aafb1862a217852cc742d18d40e
Last active April 29, 2024 18:46
Mahmoud Lambda Functions
/*
FUNCTION NAME: J_EOMONTH
VERSION:1.0
AUTHOR: Mahmoud Bani Asadi
WEB: www.arshad-hesabdar.ir
INSTAGRAM: @SoftwareTrain
DESCRIPTION: Return the serial number of the last Persian day of the month before or after a specific number of months.
ARGS:
start_date: is a serial date number that represents the start Persian date.
months: is the number of months before or after the start_date.
@SergeiStPete
SergeiStPete / gist:45cbe2bd1f4062861d1738a034adeb33
Created February 13, 2022 16:52
BYROW BYCOL sample integrated aggregations
/*
calc(n) - integrates aggregation function with
BYROW() or BYCOL(), where
n - number of aggregation function
That is simple sample without error handling
and help output.
Used as:
=BYROW( range, calc(n) )
@ExcelExciting
ExcelExciting / LAMBDA_HIJRIAGE.txt
Last active June 15, 2023 09:29
Lambda - 00001 - Hijri Age Calculator Excel
HIJRIAGE =
/*Hijri Age Calculator allows you to calculate the age of person as per arabic calander.
https://excelexciting.com/how-to-calculate-hijri-age-in-excel/
EXAMPLE:
=HIJRIAGE("3/3/1991")
RESULT>> 31 years 10 months 25 days
If you like to cacluate the Gregorian Age then you need enter next argument as "g"
EXAMPLE:
=HIJRIAGE("3/3/1991","g")
RESULT>> 30 years 11 months 11 days
NoNumbers = lambda(TextCell,TEXTJOIN("",FALSE,IF(ISNUMBER(MID(TextCell,SEQUENCE(1,LEN(TextCell)),1)*1),"",MID(TextCell,SEQUENCE(1,LEN(TextCell)),1))));
Reverse = LAMBDA(TextCell,TEXTJOIN("",FALSE,MID(TextCell,SEQUENCE(1,LEN(TextCell),LEN(TextCell),-1),1)));
PROPERSPACE = LAMBDA(Text, LET(TextUpper,MID(UPPER(Text),SEQUENCE(1,LEN(Text)),1),TextLower,MID(Text,SEQUENCE(1,LEN(Text)),1),TRIM(TEXTJOIN("",TRUE,IF(CODE(TextUpper)=CODE(TextLower),SUBSTITUTE(TextLower,TextLower," "&TextLower),TextLower)))));
Compare = LAMBDA(Range1,Range2,TEXTJOIN("|",TRUE,IF(Range1<>Range2,ADDRESS(ROW(Range2),COLUMN(Range2)),"")));
WordSearch = LAMBDA(STARTCELL,TARGETWORD,IF(OR(STARTCELL&""=LEFT(TARGETWORD),STARTCELL="?"),IF(LEN(TARGETWORD)=1,TRUE,OR(WordSearch(OFFSET(STARTCELL,-1,0),MID(TARGETWORD,2,LEN(TARGETWORD))),WordSearch(OFFSET(STARTCELL,1,0),MID(TARGETWORD,2,LEN(TARGETWORD))),WordSearch(OFFSET(STARTCELL,0,1),MID(TARGETWORD,2,LEN(TARGETWORD))),WordSearch(OFFSET(STARTCELL,0,-1),MID(TARGETWORD,2,LEN(TARGETWORD))),)),FALSE));
Hail
@jimpea
jimpea / lambdas.txt
Last active October 21, 2024 17:57
Some usefull Excel Lambda functions
/*
Append two ranges horizontally.
Inputs:
- range1: the first range
- range2: the second range
- default: the value entered into missing rows.
Return: The merged ranges, with empty rows filled with the default value. Missing
value within either of the two ranges filled with zeros (0). The number of rows
@jkpieterse
jkpieterse / excel-lambda-SheetName.txt
Last active October 18, 2023 16:27
Excel lambda to get the name of the worksheet into a cell. Import this using the Excel Advanced Formula Environment add-in
SheetName =LAMBDA(cl,LET(f,CELL("filename",cl),MID(f,FIND("]",f)+1,LEN(f))))
@jkpieterse
jkpieterse / excel-lambda-quadraticequation.txt
Last active August 26, 2023 03:40
Excel lambda formula to calculate roots of a parabola
QuadraticEquation = LAMBDA(a, b, c,
(-b + {-1, 1} * SQRT(b ^ 2 - 4 * a * c)) / 2 / a
);
@jkpieterse
jkpieterse / Excel-lambda-water97.txt
Last active April 14, 2024 12:54
Excel Lambda functions to calculate thermodynamic properties of water
cpreg1 = LAMBDA(temp, press,
LET(
tau, 1386 / temp,
pi, 0.1 * press / 16.53,
-0.001 * rgas_water * tau ^ 2 * gammatautaureg1(tau, pi)
)
);
cpreg2 = LAMBDA(temp, press,
LET(
/* Reverses an n-dimensional array */
REVERSE_ARR =LAMBDA(my_array,
LET(
row_length, ROWS(my_array),
col_length, COLUMNS(my_array),
IF(col_length = 1,
/* its a vertical list, reverse it*/
MAKEARRAY(row_length, 1, LAMBDA(row, col, INDEX(my_array, row_length - row + 1))),
/* horizontal array */