Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 15, 11:50*am, "Lazzzx" wrote:
=LEFT(A1,FIND("*",SUBSTITUTE(A1,"-","*",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))*)-1) Note: The original textstring cannot include "*". If that is the case, you will have to replace the two asterixes with som string that does not occur in your original strings. Only works if the string to search for (here "-") has the length of one character. rgds, Lazzzx "GregInMI" skrev i ... 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- Hide quoted text - - Show quoted text - AWESOME! Thanks everyone for the help. I used option #2 and it worked great! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Character Search a cell | Excel Worksheet Functions | |||
Find last instance of character in text | Excel Discussion (Misc queries) | |||
How can I search for more than one text character in a cell? | Excel Worksheet Functions | |||
How do I search for more than one text character in one cell? | Excel Worksheet Functions | |||
Search for a specific character in a cell in an if statement | Excel Worksheet Functions |