extract word before /

W

Wanna Learn

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
 
D

Dave Peterson

=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.
 
F

FSt1

hi
if the cells always has the name of the university then / initials of the
state,
try text to columns using the back slash as a delimiter.

on the 03 menu bar>data>text to columns>follow the wizard.

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top