SOLVED

switching text in a string

Copper Contributor

I tried to figure out how to switch a text where I want to move the last characters, always the same, to the beginning instead

For example

car.flx

bike.flx

...

should become

flx.car

flx.bike

 

and so on

thanks

6 Replies
best response confirmed by stepic7 (Copper Contributor)
Solution

@stepic7 

As variant

=RIGHT(A1, LEN(A1) - FIND(".",A1) ) & "." & LEFT( A1, FIND(".",A1) - 1)

 

Use Flash Fill.

@Sergei Baklan 

thanks a lot

congratulations

sorry don't know what you mean by flash fill

@stepic7 

Well, I mean Flash Fill because it is called Flash Fill.

https://www.google.com/search?q=what+is+flash+fill+in+excel&oq=what+is+flash+fill

@stepic7 

=LET(a,FIND(".",A1),
b,RIGHT(A1,LEN(A1)-a),
c,LEFT(A1,a-1),
CONCATENATE(b&"."&c))

An alternative could be above formula if you work with Office365 or 2021. 

1 best response

Accepted Solutions
best response confirmed by stepic7 (Copper Contributor)
Solution

@stepic7 

As variant

=RIGHT(A1, LEN(A1) - FIND(".",A1) ) & "." & LEFT( A1, FIND(".",A1) - 1)

 

View solution in original post