Forum Discussion
Alessandro_Becci
Sep 09, 2020Copper Contributor
Trimming formula in Excel
Hello! I have an issue with a trimming formula. I am trying to trim a string and I want to get anything that is between the first and the last dot of the string. Here is an example: I have www.he...
- Sep 09, 2020
Hi Alessandro_Becci,
Try this:
=LEFT(TRIM(MID(A2,FIND(".",A2)+1,256)),FIND("~",SUBSTITUTE(MID(A2,FIND(".",A2)+1,256),".","~",LEN(TRIM(MID(A2,FIND(".",A2)+1,256)))-LEN(SUBSTITUTE(TRIM(MID(A2,FIND(".",A2)+1,256)),".",""))))-1)
Bennadeau
Sep 09, 2020Iron Contributor
Hi Alessandro_Becci,
Try this:
=LEFT(TRIM(MID(A2,FIND(".",A2)+1,256)),FIND("~",SUBSTITUTE(MID(A2,FIND(".",A2)+1,256),".","~",LEN(TRIM(MID(A2,FIND(".",A2)+1,256)))-LEN(SUBSTITUTE(TRIM(MID(A2,FIND(".",A2)+1,256)),".",""))))-1)
- Alessandro_BecciSep 09, 2020Copper Contributor
- BennadeauSep 09, 2020Iron Contributor
You're very welcome!