Hi,
I have a number of different codes which can be anywhere from 6 to 11 characters long and either end with a number or a letter.
What I want a code to do is to remove the last character if it is a letter only.
How would I do this?
Hi,
I have a number of different codes which can be anywhere from 6 to 11 characters long and either end with a number or a letter.
What I want a code to do is to remove the last character if it is a letter only.
How would I do this?
You could try
=LEFT(A2,LEN(A2)-1)&IF(ISNUMBER(--RIGHT(A2)),RIGHT(A2),"")
Hi in VBA try this:
![]()
Please Login or Register to view this content.
Regards
tom1977
If You are satisfied with my solution click the small star icon on the left to say thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks