jeudi 22 août 2019

Googe Sheets Regex combine with IF

Please help me solve the error in my formula.

Data:

Condition 1 Cell A1: 7 x ecobulb-90R (CFL Replace) (bedroom) @ $3

Condition 2 Cell A1: 7 x ecobulb-90R (CFL Replace) @ $3

Condition 3 Cell A1: 7 x ecobulb-90R CFL Replace @ $3

My regex formula that i've used:

IF(REGEXMATCH(A1,"x\s((.*) (.*)|(.*)?)\s@"),REGEXREPLACE(A1,$1,"x\s(((.*) (.*)))\s@"),$1)

Expected output: if there are no strings enclosed in parenthesis and if there is only one pair of the string enclosed in parenthesis before the "@" symbol get the strings before the "@" symbol.

Aucun commentaire:

Enregistrer un commentaire