View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default extract word before /

=search("/",a1)
will give you the position of the slash.

So
=left(a1,search("/",a1)-1)
will give you the stuff before the slash.

If there's a chance that you don't have slashes in the data, you could use:
=left(a1,search("/",a1&"/")-1)

It'll avoid the error.

Wanna Learn wrote:

Hello I want to extract the word or words before the " /" example the
cell reads University of Texas/TX so I need to extract University of Texas .
I tried right and left functions but it does not work. the cells always has
the name of the university then / initials of the state thanks in advance


--

Dave Peterson