Reputation: 131
Trying to fix some malformed data. Here is the formula I'm using:
={"Final Name";ARRAYFORMULA(IFERROR(IF(ISBLANK(E3:E),,LEFT(E3:E,find(".",E3:E)-2))))}
Here is a sample of the data in colE. The list indent is not part of the data, it's just formating here for readability. I'm guessing I need some regex or something here but that's a little beyond my scope.
The first produces CeeDee Lamb. That's perfect. The rest of them are not working - which is to be expected but I don't know how to fix.
Any thoughts?
Upvotes: 1
Views: 24
Reputation: 1
try:
=ARRAYFORMULA(REGEXREPLACE(TRANSPOSE(QUERY(TRANSPOSE(IFERROR(
ARRAY_CONSTRAIN(SPLIT(A1:A, " "), 9^9, 2))),, 9^9)), "[A-Z]?\.$", ))
Upvotes: 2