View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Select specific Data from a cell

Bob,

Is the data really delimited by a | character? If so, use the
following code:


Dim S As String
Dim F As String
Dim Pos As Integer
S = Range("A1").Text
Pos = Inkster(1, S, "|")
F = Left(S, Pos - 1)
Debug.Print F



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
...
Hello
Windows XP Professional SP2
Office professional 2003 SP1

I have a column of data that has the following contents

contact 1 | contact2 | contact 3

I'd like to select the first contact. Each contact name is
different
in size and usually there is a first and last name for each
contact.
How do I extract to the first contact from this record?

Thank you
Bob