In Column F, I have a list of states and their abbreviations.
CodePudding user response:
Are you looking for something like this?
To extract everything before the comma:
=REGEXEXTRACT(A29,"[^,]*")
To extract everything after the comma:
=REGEXEXTRACT(A29,".*,(.*)")
Alaska, "AK"
will return Alaska
and "AK"
CodePudding user response:
You don't need regex for this, a simple SPLIT
will do the job.
=SPLIT(A1,",""")
Or as an array formula:
=ArrayFormula(IFERROR(SPLIT(A1:A,""",")))