Last active
April 13, 2022 15:03
-
-
Save 1504168/146ade4a63894f04399008e2353f78c6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /*Count of occurence and SumIfs From two different Column | |
| @Author: Md.Ismail Hosen | |
| @Email: [email protected] | |
| @Param: NameData : This is the column which has header text | |
| @Param: ValueData : This is the column from which we need to SumIf | |
| */ | |
| CountAndSumReport=LAMBDA(NameData,ValueData, | |
| LET( | |
| UniqueFirstData,UNIQUE(NameData), | |
| CHOOSE({1,2,3},UniqueFirstData,COUNTIF(NameData,UniqueFirstData),SUMIF(NameData,UniqueFirstData,ValueData)) | |
| ) | |
| ) |
This file contains hidden or 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 Extract Non Digit ([email protected])>>[email protected] | |
| @Author: Md.Ismail Hosen | |
| @Email: [email protected] | |
| @Param: SourceText : This is the input text which contains both number and digit. | |
| @PossibleError: #CALC! if there is only numbers. | |
| */ | |
| ExtractNonDigit=LAMBDA(SourceText, | |
| LET( | |
| Chars,MID(SourceText,SEQUENCE(LEN(SourceText),1),1), | |
| ReplaceDigitWithComma,REDUCE("",Chars,LAMBDA(ConsolidatedText,CurrentChar,ConsolidatedText & IF( NOT(ISNUMBER(VALUE(CurrentChar))),CurrentChar,IF(RIGHT(ConsolidatedText,1)<>",",",","")))), | |
| XML,"<root><child>" & SUBSTITUTE(ReplaceDigitWithComma,",","</child><child>") & "</child></root>", | |
| SplittedNumbers,FILTERXML(XML,"//child"), | |
| FILTER(SplittedNumbers,(NOT(ISERROR(SplittedNumbers)))*(NOT(ISNUMBER(SplittedNumbers)))) | |
| ) | |
| ) |
This file contains hidden or 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 Extract Digit ([email protected])>>1997 | |
| @Author: Md.Ismail Hosen | |
| @Email: [email protected] | |
| @Param: SourceText : This is the input text which contains both number and digit. | |
| @PossibleError: #CALC! if there is only non digits. | |
| */ | |
| ExtractNumbers=LAMBDA(SourceText, | |
| LET( | |
| Chars,MID(SourceText,SEQUENCE(LEN(SourceText),1),1), | |
| ReplaceNonDigitWithComma,REDUCE("",Chars,LAMBDA(ConsolidatedText,CurrentChar,ConsolidatedText & IF(ISNUMBER(VALUE(CurrentChar)),CurrentChar,IF(RIGHT(ConsolidatedText,1)<>",",",","")))), | |
| XML,"<root><child>" & SUBSTITUTE(ReplaceNonDigitWithComma,",","</child><child>") & "</child></root>", | |
| SplittedNumbers,FILTERXML(XML,"//child"), | |
| FILTER(SplittedNumbers,ISNUMBER(SplittedNumbers)) | |
| ) | |
| ) |
This file contains hidden or 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
| /*FrequencyCount From a Single Column Data | |
| @Author: Md.Ismail Hosen | |
| @Email: [email protected] | |
| @Param: SourceData : This is the column for which we need to count. | |
| */ | |
| FrequencyCount=LAMBDA(SourceData, | |
| LET( | |
| UniqueFirstData,UNIQUE(SourceData), | |
| CHOOSE({1,2},UniqueFirstData,COUNTIF(SourceData,UniqueFirstData)) | |
| ) | |
| ) |
This file contains hidden or 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
| /*SumIfs From two different Column | |
| @Author: Md.Ismail Hosen | |
| @Email: [email protected] | |
| @Param: NameData : This is the column which has header text | |
| @Param: ValueData : This is the column from which we need to SumIf | |
| */ | |
| TotalReport=LAMBDA(NameData,ValueData, | |
| LET( | |
| UniqueFirstData,UNIQUE(NameData), | |
| CHOOSE({1,2},UniqueFirstData,SUMIF(NameData,UniqueFirstData,ValueData)) | |
| ) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment