# can you return 2 values for 2 different conditions?

#### Oakey

##### New Member
Im looking to extend this formula, so that if Cell A1 contains either the work Inbound or Outbound then it will return a different value

I want inbound to return INB and outbound to return OUB.

Currently i can get the inbound to work, but i want to add the 2nd condition. The formula im using is

=IF(ISNUMBER(SEARCH("inbound",A1)),"inb","")

How do i extend this to add the 2nd condition for outbound?

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
=IF(ISNUMBER(SEARCH("inbound",A1)),"inb",IF(ISNUMBER(SEARCH("outbound",A1)),"oub",""))

Assuming a cell will contain the word "bound" only if it is inside the word "inbound" or "outbound", this formula will also work for you...

=IF(RIGHT(A2,5)="bound",UPPER(LEFT(A2,3)),"")

Replies
2
Views
122
Replies
5
Views
66
Replies
8
Views
372
Replies
14
Views
592
Replies
4
Views
418

1,207,203
Messages
6,077,032
Members
446,252
Latest member
vettaforza

### 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.

### Which adblocker are you using?

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

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