在B1输入公式:
=SUBSTITUTE(IF(ISERROR(FIND("左",A2)),"","左")&IF(ISERROR(FIND("右",A2)),"","右"),"左右","全部")
下拉填充。
B1=TRIM(IF(OR(MID($A1,COLUMN(A1),1)="左",MID($A1,COLUMN(A1),1)="右"),MID($A1,COLUMN(A1),1),"")&IF(OR(MID($A1,COLUMN(B1),1)="左",MID($A1,COLUMN(B1),1)="右"),MID($A1,COLUMN(B1),1),"")&IF(OR(MID($A1,COLUMN(C1),1)="左",MID($A1,COLUMN(C1),1)="右"),MID($A1,COLUMN(C1),1),"")&IF(OR(MID($A1,COLUMN(D1),1)="左",MID($A1,COLUMN(D1),1)="右"),MID($A1,COLUMN(D1),1),""))
下拉公式
B1
=IF(ISNUMBER(FIND("左",A1)),"左","")&IF(ISNUMBER(FIND("右",A1)),"右","")下拉填充