Look up with multiple returns

Tiggereminem

New Member
Joined
Nov 12, 2013
Messages
3
Hi,

I have a massive dataset (big for me) of just under 10000 lines. I want tbe data to two thing. The first I have achieved, being if a vlookup of airport codes, so put in the 3 digit code eg A1= LHR, and it returns B1= Heathrow C1=London and D1= UK.

What I want it to also do is if we have the four areas, code, airport, city and country; if we enter the criteria under any of these headings it will return the relevant values from data sets. So working from headers left to right, it would be increasing the number of answers. Again example, under city we enter London, the airports work return Gatwick, Luton, Heathrow and Stanstead.

I have looked up excel sites and found answers and formulae but when i execute it always returns an error. I cant understand why.

Hope this is clear.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi,

I have a massive dataset (big for me) of just under 10000 lines. I want tbe data to two thing. The first I have achieved, being if a vlookup of airport codes, so put in the 3 digit code eg A1= LHR, and it returns B1= Heathrow C1=London and D1= UK.

What I want it to also do is if we have the four areas, code, airport, city and country; if we enter the criteria under any of these headings it will return the relevant values from data sets. So working from headers left to right, it would be increasing the number of answers. Again example, under city we enter London, the airports work return Gatwick, Luton, Heathrow and Stanstead.

I have looked up excel sites and found answers and formulae but when i execute it always returns an error. I cant understand why.

Hope this is clear.

Maybe a short sample of your data and where you would like the query to be display would help.
Given in A1:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style>
codecitystatecountry
x1axw
x2bxw
x3cdyw
x4eyw
x5fyw

<colgroup><col style="width:65pt" span="4" width="65"> </colgroup><tbody>
</tbody>

In E7:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style>
count3
statey
cd
e
f

<colgroup><col style="width:65pt" span="2" width="65"> </colgroup><tbody>
</tbody>

formula in F7 is =COUNTIF($C$2:$C$6,F8)
formula in F9 is =IF(ROWS(F$9:F9)>(F$7),"",INDEX($B:$B,SMALL(IF(C$2:C$15=$F$8,ROW(C$2:C$15)),ROWS(F$9:F9)))) Ctrl + Shift + Enter not just enter on a PC or Command + Return on a MAC.
 
Upvote 0
Thanks Cyribrd, I brought this over to my data set and I also brought in some match functions. I deliberately didn't put my own data on this, as I was thinking, that if someone else had the same problem, the basic example (as you have given), was amazingly simple and worked perfectly. Even more so, I understood the formulae (once you posted it) what it was doing and asking.

I now have a three way working questioning data set. Answers about which airport a code matches, which ones are in which city and also which country.

Thank you again for the help.
 
Upvote 0
Thanks Cyribrd, I brought this over to my data set and I also brought in some match functions. I deliberately didn't put my own data on this, as I was thinking, that if someone else had the same problem, the basic example (as you have given), was amazingly simple and worked perfectly. Even more so, I understood the formulae (once you posted it) what it was doing and asking.

I now have a three way working questioning data set. Answers about which airport a code matches, which ones are in which city and also which country.

Thank you again for the help.

Thanks for the feedback.
You are most welcome.
Glad you got it.
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,399
Members
449,446
Latest member
CodeCybear

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