Created
February 28, 2022 15:29
-
-
Save MeniPorat/143644e33eb55cc68082c5e065a4655a to your computer and use it in GitHub Desktop.
REVERSESTR - An alternativr LAMBDA Function to reverse a string in EXCEL
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
| Here is an alternative to the LAMBDA function: TEXTREVERSE (suggested by Chris Gross) | |
| It is much shorter than the original | |
| /* | |
| FUNCTION NAME: REVERSESTR | |
| AUTHOR: Meni Porat | |
| DESCRIPTION: Reverses a string | |
| ARGUMENSTS: | |
| string: text string to be reversed | |
| EXAMPLE: | |
| =REVERSESTR("four score and seven years ago") | |
| */ | |
| REVERSESTR =LAMBDA(string, | |
| let(strlen,LEN(string), | |
| IF(strlen=0,string, | |
| CONCAT(MID(string,SEQUENCE(strlen,1,strlen,-1),1))))) |
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
| /* | |
| FUNCTION NAME: REVERSESTR | |
| AUTHOR: Meni Porat | |
| DESCRIPTION: Reverses a string | |
| ARGUMENSTS: | |
| string: text string to be reversed | |
| EXAMPLE: | |
| =REVERSESTR("four score and seven years ago") | |
| */ | |
| REVERSESTR =LAMBDA(string, | |
| let(strlen,LEN(string), | |
| IF(strlen=0,string, | |
| CONCAT(MID(string,SEQUENCE(strlen,1,strlen,-1),1))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment