Answer the question
In order to leave comments, you need to log in
How to cut the last 2 words in excel and paste into another cell?
Good afternoon, I have a set of words in a cell for example: A small elephant moved from a garden to a field
. I need to move the last 2 or 3 words to another cell. How to do it?
Answer the question
In order to leave comments, you need to log in
It is possible without regular expressions, only with functions, for example. like this:
=IFERROR(RIGHT(RC[-1],LSTR(RC[-1])-SEARCH(" ";RC[-1]; SEARCH(" ";RC[-1])+1));" ")
Here RC[-1] is the adjacent (to the left of the cell with the formula) cell. Everything after the first two spaces (two words) is copied into the cell with the formula. If you need to wrap fewer words, put another search into the second "SEARCH", as the 3rd parameter (starting position for the search), etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question