Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Deb Deb is offline
external usenet poster
 
Posts: 102
Default delete a - if it is the last part of a string



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!!
--
deb
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default delete a - if it is the last part of a string

Try this:

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

Hope this helps.

Pete

On Sep 21, 1:11*am, deb wrote:
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!!
--
deb


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search/Match/Find ANY part of string to ANY part of Cell Value TWhizTom Excel Worksheet Functions 0 July 21st 08 08:16 PM
Use a formula to delete part of a text string? Josh Craig Excel Worksheet Functions 4 June 29th 06 08:19 AM
How do I delete part of a text string in every cell it appears in Chacky Excel Discussion (Misc queries) 3 December 9th 05 07:06 PM
Filter on first part of string Pat Excel Discussion (Misc queries) 6 September 9th 05 05:23 PM
Extract Part of String [email protected] Excel Worksheet Functions 1 June 9th 05 08:33 AM


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"