Find in string

A

Arne Hegefors

Hi! I have a long list. I want to search column A and return a value in
column B for each row. In col A a have text a numbers. If the text "TRIP" is
found in a row and want to show a text in col B eg "trip repo". If it is not
found I want to show another text eg "repo". I seems easy but I tried
functions and they only return an error if the text is not found. How can I
do this? please help! /i use swedish excel so i dont really know the name of
the function that i tried in english). thanks!
 
D

David Biddulph

If your column A cell will contain only "TRIP" then try
=IF(A1="TRIP","trip repo","repo")

I you are looking for any string including "TRIP", then try
=IF(ISERR(FIND("TRIP",A1)),"repo","trip repo")

For translations of function names between languages (including Swedish),
try http://dolf.trieschnigg.nl/excel/excel.html
 
R

Roger Govier

Hi Arne

=IF(ISNUMBER(SEARCH("TRIP";A1));"trip repo";"repo")

Note Search() is not case sensitive and will find TRIP, Trip and trip.
If you only want TRIP, then use the case sensitive FIND()
 

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