I have an excel file with the names of bands and their genre.
Column A: bandname. Column B: genre.
The b column might contain multiple entries such as "pop/rock". I would want to split that into two rows.
Example:
- [1] Awesomeband | Pop/Rock
would be transformed to
- [1] Awesomeband | Pop
- [2] Awesomeband | Rock
How would I realise that within excel? Any clues? Thanks in advance.
I am assuming that Awesomeband|Pop|Rock stored at A1 place
For Awesomeband|Pop
=LEFT(A1,15)
For Awesomeband|Rock =
=LEFT(A1,12)&""&(RIGHT(A1,4))
I think this should work.
For the sake of @Navneet's attempts, to split to C1:D2 put in
=A$1
and copy to A2. In D1:and in D2:
Highlighting Column B and running this VBA should do the trick:
It's restricted to 2 genres but you could hack it to add more.
Had a go at writing something like @John Dirk Morrison, allows for more than two genres. doesn't work with the selection though, just column A and B on Sheet1.