truncate cell data based on specific text

Copper Contributor

Hi all, I want to truncate cell data based on specific text.
ex: SP-A-15a_C02-STA-S1-B3-645-P1Sts
in above text  i want to separate data before C02 which is highlighted in red, number of characters before C02 not fixed. 

1 Reply
Solved it using below formula
=LEFT(N4,FIND("C02",N4,1)-2) and result is SP-A-15a