ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find in string (https://www.excelbanter.com/excel-worksheet-functions/127829-find-string.html)

Arne Hegefors

Find in string
 
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!

David Biddulph

Find in string
 
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
--
David Biddulph

"Arne Hegefors" wrote in message
...
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!




Roger Govier

Find in string
 
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()

--
Regards

Roger Govier


"Arne Hegefors" wrote in
message ...
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!





All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com