# Removing last character from 7 digit serial number and replacing with zero

Hi Folks
I suspect this solution is some combination of xRight and Replace functions...but essentiall y..how do I (via formula) remove the last digit of a 7 character combination (which could be any number or text) and replace with a zero?
Thanks..
LVL 1
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
If I understand correctly, you will have text like: xxxxxxx123abcdYxxx and you want to replace Y with 0.
=LEFT(A1,FIND("123abcd",A1)+6) & "0" & MID(A1,FIND("123abcd",A1)+8,LEN(A1))
Commented:
Or else it is a simple string like
xx8tyss
and you want to remove the last character and replace it with a 0

If that is correct then

=LEFT(A1,LEN(A1)-1)&"0"

will do the trick.

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
You can use REPLACE function to replace a specific amount of characters from a specific position with other text, so to replace charcater 7 with zero

=REPLACE(A1,7,1,0)

regards, barry
Commented:
Expanding on Barry's idea:
=REPLACE(A1,FIND("123abcd",A1)+6,1,0)
This will replace the first character after the desired chain of characters using his formula with find.
Commented:
Actually, +7
Author Commented:
Thank you - you have no idea how much time this will save :-)
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.