Inserting text in column dependant on another column

D

Dave

Hi all,

I'm using Excel 2000 and am trying to extract data to display on a
graph. What I have is a string of text in capital that includes either
INT, EXT or INIT within it - When an instance is found INT, EXT or INIT
is put into the next column (same row).
i.e if text in A1 contains INT, INT will be written in B1

I've been wrestling with IF THEN ELSE to try to achieve this but I've
got nowhere :(

Can someone please help?

Dave
 
D

Don Guillett

Formula or macro. Is the text inside other text
xxxxxxxINTxxxxx or by itself INT
 
D

Dave

Don said:
Formula or macro. Is the text inside other text
xxxxxxxINTxxxxx or by itself INT
I'm trying to come up with a formula, the format of the text is XXXX INT
XXXX XXXX
 
D

Don Guillett

=IF(NOT(ISERR(SEARCH("int",C6))),"INT",IF(NOT(ISERR(SEARCH("def",C6))),"DEF",IF(NOT(ISERR(SEARCH("xyz",C6))),"Xyz","")))
 
D

Dave

Don said:
=IF(NOT(ISERR(SEARCH("int",C6))),"INT",IF(NOT(ISERR(SEARCH("def",C6))),"DEF",IF(NOT(ISERR(SEARCH("xyz",C6))),"Xyz","")))
Thank you so much :) That works brilliantly

Dave
 
D

Daryl S

Dave -

This works in Excel 2003, and I imagine it will in Excel 2000:

=IF(ISERR(FIND("INT",A4)),IF(ISERR(FIND("EXT",A4)),IF(ISERR(FIND("INIT",A4)),"","INIT"),"EXT"),"INT")

The FIND is case-sensitive, so if the INT, EXT, or INIT might be lower-case,
then you may want to use SEARCH instead of 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