excel formula

Ron99

Active Member
Joined
Feb 10, 2010
Messages
347
Office Version
  1. 2016
Platform
  1. Windows
hi,

I have list of numbers

GS012345
GS012566
GS012589

I want to add letter X after every 4th digit

for example - GS01X2345, GS01X2566, GS01X2589.

Is this possible ?

Thank you
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi,

You can use tihs formula =LEFT(A1;4)&"X"&RIGHT(A1;LEN(A1)-4) replace A1 with cell you have that numbers
 
Upvote 0
hi,

I have list of numbers

GS012345
GS012566
GS012589

I want to add letter X after every 4th digit

for example - GS01X2345, GS01X2566, GS01X2589.

Is this possible ?

Thank you

I think you haven't seen the results minutely. With a little change in formula please try this.

=LEFT(A1,4)&"X"&RIGHT(A1,LEN(A1)-4)

OR

=LEFT(A1,4)&"X"&MID(A1,5,999)
 
Upvote 0
The replace function will do that
=REPLACE(A1,5,0,"X")

With longer strings (eg "A23456789" >> "A234x5678x9") one should apply it recurivly from the end of the string
=REPLACE(REPLACE(A1, 9, 0, "x"), 5, 0, "x")
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top