I'm trying to use a formula which would take what's in the column A and convert it to what's in column B. Basically, the entire contents would end up surrounded by square brackets, and anywhere there is a comma, this comma should act as a separator, and finally all phrases separated by commas should be enclosed in parentheses. It would look like this:
<tbody>
</tbody>
Note in row 4, if there are no commas, we would just want the phrase in quotes and brackets.
How would I accomplish this with a formula? Is this done with some combination of Substitute and Trim?
Thanks!
A | B | |||
1 |
<tbody> </tbody> |
<tbody> </tbody> | ||
2 |
<tbody> </tbody> |
<tbody> </tbody> | ||
3 |
<tbody> </tbody> |
<tbody> </tbody> | ||
4 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody>
</tbody>
Note in row 4, if there are no commas, we would just want the phrase in quotes and brackets.
How would I accomplish this with a formula? Is this done with some combination of Substitute and Trim?
Thanks!