This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
def segmented_total_bar_chart( | |
df: pd.DataFrame, | |
group_col: str, | |
sub_group_col: str, | |
value_col: str, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=LAMBDA(Data, | |
LET( | |
_SumCorr, LAMBDA(sum, num_1, num_2, IF(ISNUMBER(sum), sum, IF(AND(ISNUMBER(num_1), ISNUMBER(num_2)), num_1 + num_2, sum))), | |
_Num1Corrected, LAMBDA(sum, num_1, num_2, | |
IF(ISNUMBER(num_1), num_1, IF(AND(ISNUMBER(sum), ISNUMBER(num_2)), sum - num_2, num_1)) | |
), | |
fxrec, LAMBDA(fx, L1In, L21In, L22In, L31In, L32In, L33In, L34In, | |
LET( | |
_IsDone, AND(ISNUMBER(HSTACK(L1In, L21In, L22In, L31In, L32In, L33In, L34In))), | |
Res, IF( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Format all the M code of Activeworkbook. | |
' Dependency: Microsoft XML, v6.0 (C:\Windows\System32\msxml6.dll) | |
' Developer: Md.Ismail Hosen | |
' Email : [email protected] | |
' Whatsapp: +8801515649307 | |
' LinkedIn : https://www.linkedin.com/in/md-ismail-hosen-b77500135/ | |
' Facebook : https://www.facebook.com/mdismail.hosen.7 | |
' Youtube : https://www.youtube.com/channel/UCL-q7_WvISkw0Ox9FRBBzmw | |
Public Sub FormatActiveWorkbookMCode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function will filter a 2D Array for multiple column based on FilterForValues and comparision Criteria. | |
// ComparisionOperator can be : =,<>,>,<,>=,<= where default is = | |
// LogicalOperator can be : AND,OR where default is AND. Pass this param as text. | |
// IsHeaderPresent : Default is True | |
// You can pass same column twice. | |
// ColumnNameOrIndexes will be one row or column vector | |
// It can work on a 2D array not necessarily on Table only. | |
// Author: Md.Ismail Hosen([email protected]) | |
FilterColumns=LAMBDA(TableData, ColumnNameOrIndexes, FilterForValues, [ComparisionOperator], [IsHeaderPresent], [LogicalOperator], | |
LET( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This will generate character sequence based on param. | |
//Example case =CHARSEQUENCE(2, 2,"AA",2) will give an output like this ={"AA","AC";"AE","AG"} | |
CHARSEQUENCE =LAMBDA(NumberOfRow, NumberOfColumn, [StartChar], [Step], | |
LET( | |
_StartCol, IF(ISOMITTED(StartChar), 1, COLUMN(INDIRECT(StartChar & 1))), | |
_StepCorrected, IF(ISOMITTED(Step), 1, Step), | |
_Array, SEQUENCE(NumberOfRow, NumberOfColumn, _StartCol, _StepCorrected), | |
_Result, MAP( | |
_Array, | |
LAMBDA(Curr, |


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VALIDQUARTERFINDER = LAMBDA(QuarterData, | |
LET( | |
FindStartDate, LAMBDA(QuarterText, | |
DATE(MID(QuarterText, 2, 4), RIGHT(QuarterText, 1) * 3 - 2, 1) | |
), | |
FindQuarterText, LAMBDA(GivenDate, | |
"Y" & YEAR(GivenDate) & "Q" & ROUNDUP(MONTH(GivenDate) / 3, 0) | |
), | |
QuarterBetweenTwoDate, LAMBDA(QuarterData, Input2, | |
LET( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: Add2Cells | |
*/ | |
Add2Cells = | |
LAMBDA(Cell1,Cell2,LET( | |
\\LambdaName, "Add2Cells", | |
Cell1+Cell2 | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROPERTYCODEGENERATOR = LAMBDA(VariableDeclarationLine,[IsOnlyGetter],LET( | |
SplitVariableDeclarationLine, TRANSPOSE(TEXTSPLIT(VariableDeclarationLine," ")), | |
VarNameIndex, MATCH("As",SplitVariableDeclarationLine,0)-1, | |
NonObjectDataType, {"Integer";"Long";"Single";"Double";"Currency";"Date";"String";"Boolean";"Decimal";"Byte";"LongLong"}, | |
VarName, INDEX(SplitVariableDeclarationLine,VarNameIndex,1), | |
VarDataType, INDEX(SplitVariableDeclarationLine,VarNameIndex+2,1), | |
SetPrefix, IF(ISERROR(MATCH(VarDataType,NonObjectDataType,0)),"Set ",""), | |
WithoutSetGetPropertyBodyLine, VarName & " = This." & VarName, | |
PropertyAssignWithoutSet, "this." & VarName & " = "&VarName, | |
EndPropertyCode, "End Property", |
NewerOlder