Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
guy.pembroke
 
Posts: n/a
Default IF statement with multiple values...

Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default IF statement with multiple values...


I am not sure I get all this, but couldn't you just use

=LEFT(A1,FIND("/",A1)-1)

and

=RIGHT(A1,LEN(A1)-FIND("/",A1))


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"guy.pembroke" wrote in message
...
Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through

all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1

=
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1

=
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default IF statement with multiple values...


If your data in in A2 downwards try this formula in B2 copied down

=HLOOKUP(LEFT(A2,2),{"OR","OM","O/","";"Office Range","Office
Medium","Office",""},2,0)

and in C2 copied down

=REPLACE(A2,1,FIND("/",A2&"/"),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=545020

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default IF statement with multiple values...


Note:a zero crept into my first formula when it should have been a
letter O, should be

=HLOOKUP(LEFT(A1,2),{"OR","OM","O/","";"Office Range","Office
Medium","Office",""},2,0)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=545020

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default IF statement with multiple values...

Hi Guy
with your data in column A, enter in B1
=IF(LEFT(B21,FIND("/",B21)-1)="OR","Office
Range",IF(LEFT(B21,FIND("/",B21)-1)="OM","Office Medium","Office"))
enter in C1
=TRIM(MID(B21,FIND("/",B21)+1,255))
Copy both cells down columns B and C for the extent of your data.
--
Regards

Roger Govier


"guy.pembroke" wrote in message
...
Hi,

I would like to be able to search a group of cells for particular
text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need
to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and
one
additional column for module code, without having to manually go
through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve
is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then
S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then
M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default IF statement with multiple values...

Apologies
I was working on row 21 not row 1 so change to
=IF(LEFT(A1,FIND("/",A1)-1)="OR","Office
Range",IF(LEFT(A1,FIND("/",A1)-1)="OM","Office Medium","Office"))
and
=TRIM(MID(A1,FIND("/",A1)+1,255))
respectively if working from row 1

--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Guy
with your data in column A, enter in B1
=IF(LEFT(B21,FIND("/",B21)-1)="OR","Office
Range",IF(LEFT(B21,FIND("/",B21)-1)="OM","Office Medium","Office"))
enter in C1
=TRIM(MID(B21,FIND("/",B21)+1,255))
Copy both cells down columns B and C for the extent of your data.
--
Regards

Roger Govier


"guy.pembroke" wrote in
message ...
Hi,

I would like to be able to search a group of cells for particular
text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need
to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and
one
additional column for module code, without having to manually go
through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the
system
Column and 'M' being the module column, what I would like to achieve
is;

If cell contains "O/" then S1 = Office but if cell contains "OR/"
then S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT"
then M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
guy.pembroke
 
Posts: n/a
Default IF statement with multiple values...

Thanks Bob, This did achieve what I wanted

:o)

"Bob Phillips" wrote:


I am not sure I get all this, but couldn't you just use

=LEFT(A1,FIND("/",A1)-1)

and

=RIGHT(A1,LEN(A1)-FIND("/",A1))


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"guy.pembroke" wrote in message
...
Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through

all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1

=
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1

=
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
guy.pembroke
 
Posts: n/a
Default IF statement with multiple values...

Thanks, this did achieve what I wanted!!

"daddylonglegs" wrote:


If your data in in A2 downwards try this formula in B2 copied down

=HLOOKUP(LEFT(A2,2),{"OR","OM","O/","";"Office Range","Office
Medium","Office",""},2,0)

and in C2 copied down

=REPLACE(A2,1,FIND("/",A2&"/"),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=545020


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
guy.pembroke
 
Posts: n/a
Default IF statement with multiple values...

Thanks Roger, this did achieve what I wanted!

"Roger Govier" wrote:

Apologies
I was working on row 21 not row 1 so change to
=IF(LEFT(A1,FIND("/",A1)-1)="OR","Office
Range",IF(LEFT(A1,FIND("/",A1)-1)="OM","Office Medium","Office"))
and
=TRIM(MID(A1,FIND("/",A1)+1,255))
respectively if working from row 1

--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Guy
with your data in column A, enter in B1
=IF(LEFT(B21,FIND("/",B21)-1)="OR","Office
Range",IF(LEFT(B21,FIND("/",B21)-1)="OM","Office Medium","Office"))
enter in C1
=TRIM(MID(B21,FIND("/",B21)+1,255))
Copy both cells down columns B and C for the extent of your data.
--
Regards

Roger Govier


"guy.pembroke" wrote in
message ...
Hi,

I would like to be able to search a group of cells for particular
text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need
to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and
one
additional column for module code, without having to manually go
through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the
system
Column and 'M' being the module column, what I would like to achieve
is;

If cell contains "O/" then S1 = Office but if cell contains "OR/"
then S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT"
then M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default IF statement with multiple values...

Hi

Obviously your problem is solved now, but for futu
Add a column to right of one with your codes;
Select the range with codes;
From Data menu, select TextToColumns feature. Set / as (Other) delimiter,
and finish. All entries in column are splitted at once.
(When you want to preserve merged codes too, then create a copy of original
column at start)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"guy.pembroke" wrote in message
...
Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through
all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1
=
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1
=
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how to find part of text and return values from another cell

Hi,
I wish to find a a valuse/text in a cell which contains large amountof text
and then find the corresponding valuse form another column in the same row. I
was wondering if that is possible to do. To exemplify... fromt the cell
containing the following text..

.........inferred from genetic interaction with Ras85D AND inferred from
genetic interaction with ksr <newline autophagic cell death ; GO:0048102 |
..........

I want to look for the term 'genetic' and wan the formula to retiurn me
values from the corresponding row in another column.



Thanks
Bilal


"guy.pembroke" wrote:

Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default find part of text and return values from corresponding row in anot

Hi,
I wish to find a a valuse/text in a cell which contains large amountof text
and then find the corresponding valuse form another column in the same row. I
was wondering if that is possible to do. To exemplify... fromt the cell
containing the following text..

.........inferred from genetic interaction with Ras85D AND inferred from
genetic interaction with ksr <newline autophagic cell death ; GO:0048102 |
..........

I want to look for the term 'genetic' and wan the formula to retiurn me
values from the corresponding row in another column.



Thanks
Bilal


"guy.pembroke" wrote:

Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1 =
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1 =
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default find part of text and return values from corresponding row in anot

Hi,

Try this

=VLOOKUP("*"&C8&"*",C4:E5,3,0) where C8 has genetic and the range is C4:E5

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Bilal Malik" wrote in message
...
Hi,
I wish to find a a valuse/text in a cell which contains large amountof
text
and then find the corresponding valuse form another column in the same
row. I
was wondering if that is possible to do. To exemplify... fromt the cell
containing the following text..

........inferred from genetic interaction with Ras85D AND inferred from
genetic interaction with ksr <newline autophagic cell death ; GO:0048102
|
.........

I want to look for the term 'genetic' and wan the formula to retiurn me
values from the corresponding row in another column.



Thanks
Bilal


"guy.pembroke" wrote:

Hi,

I would like to be able to search a group of cells for particular text,
placing the true of false value in another cell, using this formula;

=IF(ISNUMBER(SEARCH("ACP",A2)),"ACP","XXX")

My reason for this is that I have a large amount of data that I need to
break down. I have a column that is listed similar to below;

OR/ACP
OM/ACT
OR/MTS
O/O

The part before the / is 'system code'
The part after the / is 'module code'

I want to be able to have one additional column for system code and one
additional column for module code, without having to manually go through
all
the data and make any amendments to it.

So as a result, (without the correct syntax) with 'S' being the system
Column and 'M' being the module column, what I would like to achieve is;

If cell contains "O/" then S1 = Office but if cell contains "OR/" then S1
=
Office Range but if cell contains "OM/" then S1 = Office Medium

I hope that makes sense.

Obviously repeated for the module column;

If cell contains "/ACP" then M1 = ACP but if cell contains "/ACT" then M1
=
ACT but if cell contains "/O" then M1 = O

I really hope that makes sense!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Index function using multiple values in one cell [email protected] Excel Worksheet Functions 2 May 11th 06 08:14 PM
Allow selection of multiple values in dropdown list in excel Nancy @ CHR Excel Discussion (Misc queries) 2 April 13th 06 10:44 PM
Return Summed Count of Multiple Consecutive Numeric Values Sam via OfficeKB.com Excel Worksheet Functions 4 April 10th 06 10:35 PM
Look up one value and return multiple corresponding values in exce Morphis Excel Discussion (Misc queries) 6 March 31st 06 02:20 AM
Search multiple values to return single values JANA Excel Worksheet Functions 8 October 27th 05 04:26 PM


All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"