View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default How do I include part of a cell in text (string?) in another cell?

I have a spreadsheet in which A:1 contains First and Second Names as a
single entry, e.g. 'Fred Smith'.

I want to be able to include only the First Name in statements in other
fields, e.g. 'Fred can .' I have considered splitting the name across two
fields, but this would introduce other complications.

How can I refer to A:1 such that only the first name, which is of variable
length, will be picked up, i.e. everything up to, and possibly including'
the space?

I know I can use '=A:1& 'can.'' which will come out as 'Fred Smith can.',
but how do I make it read 'Fred can.'?


This formula...

=LEFT(A6,FIND(" ",A6)-1)

will pick up the text up to, but not including, the space following it. If
you want to keep the space, remove the -1.

Rick