delete a - if it is the last part of a string

  • Thread starter Thread starter deb
  • Start date Start date
D

deb

How can I delete a - if it is the last part of a string.

I have other - in the string but I only want to delete it if it is the last
character.

Thanks in advance!!
 
Try this:

=IF(RIGHT(A1,1)="-",LEFT(A1,LEN(A1)-1),A1)

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top