View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GregInMI GregInMI is offline
external usenet poster
 
Posts: 2
Default How to search a cell for last instance of repeating character anddelete to end of data

I just got hit with a hot request and am looking for commands/script
that will search the text in a cell, find the last occurance of a
repeating character and then delete the rest of the data in the cell
from that point to the end.

Here is a sample of the data I have to work with:

xxxx-xxx-xx-xxx-xxxxxxx

I want to scan to the last '-' in the cell and then delete the '-'
along with the 7 'x' characters.

Any help to leverage something that already exists versus writing a
script would be appreciated.

Regards,
Greg