can you return 2 values for 2 different conditions?

Oakey

New Member
Joined
Jan 9, 2017
Messages
49
Office Version
  1. 365
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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
=IF(ISNUMBER(SEARCH("inbound",A1)),"inb",IF(ISNUMBER(SEARCH("outbound",A1)),"oub",""))
 
Upvote 0
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)),"")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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