PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, November 3, 2022

[FIXED] How to Flip a string in google sheets

 November 03, 2022     google-sheets, google-sheets-formula, lambda, sequence, textjoin     No comments   

Issue

I have this google sheets input column on the left, I want to flip the string like shown in the output column.

Input   Output
--------------
bats    stab
live    evil
meet    teem
part    trap
stop    pots

Solution

Split the string to it's characters using regex delimiter, then REDUCE the string using current&accumulator(reversal happens here):

=REDUCE(,SPLIT(REGEXREPLACE(A2,,"🐾"),"🐾"),LAMBDA(a,c,c&a))

For a array, use BYROW:

=BYROW(A2:INDEX(A2:A,COUNTA(A2:A)),LAMBDA(str,REDUCE(,SPLIT(REGEXREPLACE(str,,"🐾"),"🐾"),LAMBDA(a,c,c&a))))


Answered By - TheMaster
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing