Forum Discussion

SGeorgie's avatar
SGeorgie
Brass Contributor
Nov 17, 2022

Text to columns with two names

Hi

I know how to use text to columns, with a space, comma etc but how do i split names

 

A1

Mr Smith and Mr Potter

Miss White and Miss Excel and Miss Axel

Mr Onl

Miss Patterson and Mr Magnusson

 

 

I want to see 

     A                                        B                     C                              D                    E

1  Mr Smith                             and                Mr Potter

2  Miss White                          and                Miss Excel                and                 Miss Axel

3  Mr Onl

4  Miss Patterson                    and                Mr Magnusson

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    SGeorgie Do you really need to keep the word "and" in its own column? If not, you can use TEXTSPLIT (still Inserders/Beta I believe) or Power Query. both allow the use of " and " as a delimiter. Something text-to-columns can't.

    See attached.

     

    And then there's always VBA to split the text, I guess. But that's not my thing.

     

     

    • SGeorgie's avatar
      SGeorgie
      Brass Contributor
      The 'and' is not needed. I just want to know number of people

Resources