I'm cleaning a dataset and need to take the part of the string between the underscores (_). Column A is what I am starting with.
A
foo_bar_foo
bar_foo_bar
bar
foo_bar_foo
I need to copy over the characters in between the underscores and copy them into a new column. Column B is the anticipated results.
A B
foo_bar_foo bar
bar_foo_bar foo
bar null
foo_bar_foo bar
Any advice is appreciated.