Excel formula - Help or suggestion to get a solution

Victor87

New Member
Joined
Jul 18, 2015
Messages
1
Hi All,

I am trying get a value which is on column c, based on conditions. Where I have 3 values (0,1,2) I want formula to return.

I have tried using IF, OR, AND functions. but, I feel like I am missing something.
I would appreciate if you could help/ suggest towards getting my solution.

I am using excel 2013

[TABLE="width: 261"]
<!--StartFragment--> <colgroup><col width="87" span="3" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 87"]Seattle [/TD]
[TD="width: 87"]BUS[/TD]
[TD="width: 87, align: right"]1[/TD]
[/TR]
[TR]
[TD]SFO[/TD]
[TD]Walk[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]LA[/TD]
[TD]Train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl64"]lA[/TD]
[TD="class: xl64"]bUS[/TD]
[TD="class: xl64, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl65"]seattle [/TD]
[TD="class: xl65"]bUS[/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl64"]SFO[/TD]
[TD="class: xl64"]bUS[/TD]
[TD="class: xl64, align: right"]2[/TD]
[/TR]
[TR]
[TD]SFO[/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]walk[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]walk[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Seattle [/TD]
[TD]walk[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"]SFO[/TD]
[TD]BUS[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]LA[/TD]
[TD]bUS[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]SFO[/TD]
[TD]bUS[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]Seattle [/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]SFO[/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]SFO[/TD]
[TD]train[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]SFO[/TD]
[TD]walk[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]lA[/TD]
[TD]walk[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]lA[/TD]
[TD]wb[/TD]
[TD="align: right"]2[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You've shown us the data sample and given the result you expect, but not the reason / logic behind selecting the value.

I'm going to guess that you want to enter a city and mode of transport then get the corresponding value.

Try

=LOOKUP(2,1/IF(A2:A20="Seattle",B2:B20="train"),C2:C20)

Confirmed as an array formula using Shift Ctrl Enter.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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