Return cell characters after space

  • Follow


I have a cell with 'Mr J. Smith' and want to return in another cell 'Smith'. 
As there are many other examples, I need a function that will seek out the 
last ' ' in the cell content and then return all characters to the right 
hand-side of this ' '.

e.g. 'Mr K Peters' would return 'Peters'

Please let me know if I can clarify!
0
Reply Utf 4/21/2010 9:15:01 AM

Hi Andy

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))

-- 
Jacob (MVP - Excel)


"Andy" wrote:

> I have a cell with 'Mr J. Smith' and want to return in another cell 'Smith'. 
> As there are many other examples, I need a function that will seek out the 
> last ' ' in the cell content and then return all characters to the right 
> hand-side of this ' '.
> 
> e.g. 'Mr K Peters' would return 'Peters'
> 
> Please let me know if I can clarify!
0
Reply Utf 4/21/2010 9:20:01 AM


Brilliant, thanks!

"Jacob Skaria" wrote:

> Hi Andy
> 
> =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))
> 
> -- 
> Jacob (MVP - Excel)
> 
> 
> "Andy" wrote:
> 
> > I have a cell with 'Mr J. Smith' and want to return in another cell 'Smith'. 
> > As there are many other examples, I need a function that will seek out the 
> > last ' ' in the cell content and then return all characters to the right 
> > hand-side of this ' '.
> > 
> > e.g. 'Mr K Peters' would return 'Peters'
> > 
> > Please let me know if I can clarify!
0
Reply Utf 4/21/2010 9:25:01 AM

2 Replies
2156 Views

(page loaded in 0.053 seconds)

Similiar Articles:
















7/23/2012 9:34:03 AM


Reply: