Forum Discussion

Alessandro_Becci's avatar
Alessandro_Becci
Copper Contributor
Sep 09, 2020
Solved

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...
  • Bennadeau's avatar
    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)

     

     

Resources