Eloise T
Active Member
I am currently using the following formula to find a text string in a cell using the TRIM function to kill the spaces and the MID function to extract the string. I'm receiving the data containing the text string from many sources. Sometimes the submitters get sloppy and not only include unwanted spaces (the TRIM handily takes care of) but include other alphanumeric characters in front of (a problem) or behind (not a problem) the text string I'm wanting to isolate. Please see the attached file for clarification.
The formula: =IF(AND(H10=30,MID(TRIM(J10),1,3)="Tax"),30)
The formula: =IF(AND(H10=30,MID(TRIM(J10),1,3)="Tax"),30)