Forum Discussion
kyrillkaz
Apr 07, 2021Copper Contributor
IF with two REPLACE statements to move character in string
Hi, I have a 40 character-long string in which I want to check if there is a C on the 23rd position and if so, move that C to the 37th position. Right now, I'm trying to do it with the following ...
tauqeeracma
Apr 07, 2021Iron Contributor
Hi kyrillkaz
You may try below formula:
=IF(MID(B8,23,1)="C",LEFT(B8,22)&MID(B8,24,14)&"C"&RIGHT(B8,3),B8)
A sample file is also attached for your reference. Hope it will work as desired.
Thanks
Tauqeer