VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
How can I extract text between ampersands? I want to have it up to 3 ampersands. I got the formula's to work up to only 1 ampersand. is there an easier way to get this without VBA? The data between the Ampersands should always start with "SO".
F1 Formula
G1 Formula
F1 Formula
Code:
=IFERROR(IF(LEFT(A1,2)="SO",LEFT(A1,(FIND("&",A1)-2)),""),A1)
G1 Formula
Code:
=IFERROR(IF(LEFT(IF(RIGHT(TRIM(RIGHT(A1,(FIND("&",A1,1)-1))),1)<>"S",TRIM(RIGHT(A1,(FIND("&",A1,1)*1))),TRIM(RIGHT(A1,(FIND("&",A1,1)-1)))),1)="&",TRIM(RIGHT(A1,(FIND("&",A1,1)-2))),IF(RIGHT(TRIM(RIGHT(A1,(FIND("&",A1,1)-1))),1)<>"S",TRIM(RIGHT(A1,(FIND("&",A1,1)*1))),TRIM(RIGHT(A1,(FIND("&",A1,1)-1))))),"")