Yeah, I was talking about the Split function (in VBA) because you specified a macro in the original question. But if you can do it in the worksheet, without writing a macro, I'd use FIND and MID strings, not Split.
I haven't tested Catalin.B's solution, but I did notice it uses LEFT rather than MID. Just for variety's sake, here's my own idea using Excel worksheet functions: I'd do it not in just one column but several, each one simpler, with the helping columns out of the way out at the right. (Some people even hide their helping columns.)
In helping column X: =FIND("/",A1)
In helping column Y: =FIND("/",A1&"/",X1+1)
In helping column Z: =MID(A1,X1+1,Y1-X1-1)
In results column B: =IF(UPPER(Z1)="N","",Z1)
That uses more columns but each piece of it is easier to understand.
|