If statement help

Punquey

New Member
Joined
Jul 11, 2017
Messages
8
I have a table that looks like this:[TABLE="width: 287"]
<colgroup><col></colgroup><tbody>[TR]
[TD]AL INC.(CCML)[/TD]
[/TR]
[TR]
[TD]EX, LLC (FF)[/TD]
[/TR]
[TR]
[TD]TG & A/C (B-FF)[/TD]
[/TR]
[TR]
[TD]JING & A/C (B-FF)[/TD]
[/TR]
[TR]
[TD]OKA (B-FF)[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]EATING & A/C,INC(B-GA)[/TD]
[/TR]
[TR]
[TD]MECHANICAL AIR SYSTEMS INC[/TD]
[/TR]
</tbody>[/TABLE]

I need to be able to identify the B or the C in the parenthesis of each and name it Boy and Coy in a new column next to the original. I know how to identify (C and tag it, but not sure how to do two items and nest it. Thanks in advance!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Excel 2010[TABLE="class: grid, width: 500"]
<colgroup><col><col><col></colgroup><tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]AL INC.(CCML)[/TD]
[TD]Coy[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]EX, LLC (FF)[/TD]
[TD]what should happen if it is not B or C[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]TG & A/C (B-FF)[/TD]
[TD]Boy[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]JING & A/C (B-FF)[/TD]
[TD]Boy[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]OKA (B-FF)[/TD]
[TD]Boy[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]EATING & A/C,INC(B-GA)[/TD]
[TD]Boy[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD]MECHANICAL AIR SYSTEMS INC[/TD]
[TD]What should happen if there is no ()[/TD]
[/TR]
</tbody>[/TABLE]
Sheet4
Copy down. Replace what should happen if it is not B or C and What should happen if there is no () with what you want
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="class: grid, width: 100%"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TD="width: 10"]Cell[/TD]
[TD="align: left"]Formula[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=IFERROR(IF(MID(A1,SEARCH("(",A1)+1,1)="B","Boy",IF(MID(A1,SEARCH("(",A1)+1,1)="C","Coy","what should happen if it is not B or C")),"What should happen if there is no ()")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
here is another approach...
=IF(ISNUMBER(SEARCH("(c",A1)),"Coy",IF(ISNUMBER(SEARCH("(b",A1)),"Boy",""))
copied down
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top