View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Doug Doug is offline
external usenet poster
 
Posts: 460
Default Extracting specific text from another cell.

James,

thanks for your help. I actually used the IF statement with a SEARCH
function and that worked. I won't lose my notes this time.

Thanks again!
Doug

"jamescox" wrote:


Nope, you're not sounding stupid.

Sounds like you need an IF statement that uses FIND to see if the
string you are looking for is in the cell you are looking at.

You will need the ISERROR function in the condition part of the IF
because FIND returns a #VALUE! error if the string you are looking for
isn't in the cell.

If you are looking for just one string - "Finance" for example, you can
just have the IF function return a value of "Finance" if FIND doesn't
generate an error.

If you are doing something a bit more complex you can put the string
you are looking for in a different cell and use that cell address (eg,
B4) as one of the parameters of the FIND (in the place of "Finance") and
use it again as what the IF statement returns if FIND doesn't generate
an error.

Note that FIND is case sensitive, so you are going to be working with
user inputs, you may want to look at using the UPPER function in the
FIND to make the string you are looking for and the string in the cell
you are looking at both all upper case...


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=111724