Extract the last substring from a cell

后端 未结 9 1858
逝去的感伤
逝去的感伤 2020-12-01 07:57

I have names in a column. I need to split just the last names from that column into another column.

The last name is delimited by a space from the right side.

9条回答
  •  伪装坚强ぢ
    2020-12-01 08:10

    RIGHT return whatever number of characters in the second parameter from the right of the first parameter. So, you want the total length of your column A - subtract the index. which is therefore:

    =RIGHT(A2, LEN(A2)-FIND(" ", A2, 1))
    

    And you should consider using TRIM(A2) everywhere it appears...

提交回复
热议问题