If neither

ExcelNooberino

New Member
Joined
Jan 2, 2019
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
Hello all, hope you're doing fine..

So I made this dashboard with some data I insert every once and a while, and in the table that contains all that data I have two columns stating the some locations. It's a simple table where I insert the pickup location in one column and the delivery location in the next one, and on the third one, I have an IF formula that tells me that if the pickup location is for example "Miami" in the third column it will return me the value "Outbound" and if not it will return "Inbound". The thing is that some times, I arrange some transportation from point A to B and neither of them are my company so, it those cases it doesn't make sense label them as "Inbound" or "Outbound". I was wondering if there's any formula that allows me to state that if neither of those columns have the value "Miami" it should return a different value such as "XBound" for example... I hope I made my question clear, but if not I can try to explain myself a little better. For now I have this:

Data.Cells(row, 10).Formula = "=IF(H" & row & "=""Miami"",""Outbound"",""Inbound"")" 'Bound

Thanks in advance :stickouttounge:
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
This is the formula you need to convert to VBA

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
H
[/th][th]
I
[/th][th]
J
[/th][th]
K
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]From[/td][td]To[/td][td]Label[/td][td] Formula[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]Miami[/td][td]New York[/td][td]OutBound[/td][td] =IF(H5="Miami","OutBound",IF(I5="Miami","InBound","Xbound"))[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]New York[/td][td]Miami[/td][td]InBound[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]Houston[/td][td]New York[/td][td]Xbound[/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: SheetXX[/td][/tr][/table]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,821
Messages
6,181,163
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