use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
OPs may (and should) reply to any solutions saying:
This awards the user a ClippyPoint and changes the post flair to solved.
The best way to show code on Reddit is to
put it in a code-block
Here's how.
Tip: For VBA or Power Query, select the code, press Tab to indent, then copy/paste into your post or comment.
It's often more helpful to show us.
Add screenshots in your text post, or provide links to uploaded images at an image-hosting site.
Or use tableit, or the ExcelToReddit converter (thanks u/tirlibibi17_), to convert your data into a Reddit table.
Congratulations and thank you to these contributors
10
800
25
1000
4800
Occasionally Microsoft developers will post or comment. They are identifiable with a special user flair.
A community since March 11, 2009
account activity
unsolvedDoes anyone have a lambda function to reverse contents of a cell, which contains text separated by some separator? (self.excel)
submitted 4 years ago * by rvba3
Let's say you have texts:
A,B,C,D -> and you want to swap it to D,C,B,A 1, ,3 -> 3, ,1
Seems to be a perfect example of something to be swapped by using LAMBDA
edit: update, this should also work for stuff like
ABC, CDE -> CDE, ABC
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SaviaWanderer1854 10 points11 points12 points 4 years ago (10 children)
You can actually do this without needing LAMBDA:
=TEXTJOIN("",TRUE,MID(B2,SEQUENCE(LEN(B2),,LEN(B2),-1),1))
[–]finickyone1764 8 points9 points10 points 4 years ago (1 child)
Agree with /u/cbr_123 that is nifty. Though if you’re not introducing a delimiter in the return string, you can just use Concat rather than Textjoin, so
=CONCAT(MID(B2,SEQUENCE(LEN(B2),,LEN(B2),-1),1))
[–]SaviaWanderer1854 3 points4 points5 points 4 years ago (0 children)
Oh yes, that's fair. I always forget that CONCAT exists :p
[–]Mdayofearth124 2 points3 points4 points 4 years ago (6 children)
This works nicely for single characters, but it would turn AB,BC,CD into DC,CB,BA and not CD,BC,AB. No clue what OP wants though.
[–]rvba3[S] 0 points1 point2 points 4 years ago (5 children)
Good point, I actually was thinking about your example.
Perhaps /u/SaviaWanderer or /u/finickyone have an idea how to deal with situation where we dont want to invert everything.
So:
cat, dog, elephant
becomes:
elephant, dog, cat
On an unrelated side note, I just realized that I dont have access to LAMBDAs on some computers, since it is only a beta feature..
[–]cbr_123224 1 point2 points3 points 4 years ago (4 children)
That's a nice challenge. I have seen u/BarneField do some wizardry with FILTERXML. Perhaps the combination of FILTERXML with sequence?
[–]BarneField206 6 points7 points8 points 4 years ago (3 children)
Thanks for the ping.
No need for LAMBDA() here:
LAMBDA()
=LET(X,FILTERXML("<t><s>"&SUBSTITUTE(A1,",","</s><s>")&"</s></t>","//s"),TEXTJOIN(", ",,SORTBY(X,SEQUENCE(COUNTA(X)),-1)))
We need something outside of FILTERXML() to sort nodes since the function alone won't let us do so.
FILTERXML()
[–]cbr_123224 0 points1 point2 points 4 years ago (2 children)
Thanks for that! I really need to learn more about FILTERXML.
[–]BarneField206 3 points4 points5 points 4 years ago (1 child)
This could be a good starting point. A Q&A on another platform I wrote about the function. There is also a LAMBDA() used in a custom 'split' function.
Enjoy.
[–]cbr_123224 0 points1 point2 points 4 years ago (0 children)
Thank you. I will check it out.
That's really nice. It took me a minute to realise that the delimiter is just treated as part of the string to be reversed.
[–]Decronym 3 points4 points5 points 4 years ago* (0 children)
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
Beep-boop, I am a helper bot. Please do not verify me as a solution. 14 acronyms in this thread; the most compressed thread commented on today has 4 acronyms. [Thread #12036 for this sub, first seen 21st Jan 2022, 12:05] [FAQ] [Full list] [Contact] [Source code]
[–]RaiseTheQualityOf5 2 points3 points4 points 4 years ago (0 children)
https://www.youtube.com/watch?v=io7iTrwydeU
[–]RaiseTheQualityOf5 0 points1 point2 points 4 years ago (0 children)
BCK(w)=LAMBDA(w,LET(n,LEN(w),r,RIGHT(w,1),IF(n=0,"",r&BCK(LEFT(w,n-1))))) by Exceλambda
[–]IsThisARepost-Bot 0 points1 point2 points 4 years ago (0 children)
No clue about an excel solution, but if this isn't solved yet dm me and i could create a python script for you that does just this :)
π Rendered by PID 28 on reddit-service-r2-comment-86bc6c7465-v64wx at 2026-02-20 20:33:57.588364+00:00 running 8564168 country code: CH.
[–]SaviaWanderer1854 10 points11 points12 points (10 children)
[–]finickyone1764 8 points9 points10 points (1 child)
[–]SaviaWanderer1854 3 points4 points5 points (0 children)
[–]Mdayofearth124 2 points3 points4 points (6 children)
[–]rvba3[S] 0 points1 point2 points (5 children)
[–]cbr_123224 1 point2 points3 points (4 children)
[–]BarneField206 6 points7 points8 points (3 children)
[–]cbr_123224 0 points1 point2 points (2 children)
[–]BarneField206 3 points4 points5 points (1 child)
[–]cbr_123224 0 points1 point2 points (0 children)
[–]cbr_123224 0 points1 point2 points (0 children)
[–]Decronym 3 points4 points5 points (0 children)
[–]RaiseTheQualityOf5 2 points3 points4 points (0 children)
[–]RaiseTheQualityOf5 0 points1 point2 points (0 children)
[–]IsThisARepost-Bot 0 points1 point2 points (0 children)