Formula or Macro? to answer the following Problem statement

carling73

Board Regular
Joined
Sep 7, 2011
Messages
63
Office Version
  1. 2016
Platform
  1. Windows
Hey Everyone

I'm trying to work out if single string of excel formula's word be sufficient for the following or whether I'm in the territory of of a Macro/VBA?

I'm trying to solve the following if anyone has any thoughts, suggestions

Problem Statement:- Which specific a) Aircraft is the most suitable for b) a specific route, based on:-
  1. c) The flying range of the Aircraft - 1,000km - 18,000km
  2. d) The length of the airport runway for both the departure airport and arrival airport - 3,117km - 15,010km
  3. e) The runway length needed for any specific aircraft to land? In connection with (d) - 1,565km - 18,000km
  4. f) The Stage (Cost) range of the Aircraft - 1 - 12 - meaning if i'm at cost stage 1 only Aircraft with that status should be considered
  5. g) The Earnings/Cost Ratio of a specific Aircraft for a specific Route. -$10 - $10
Here's a quick example of the base data being used to to try and answer the above, i'd really appreciate any thoughts/suggestions

Thank You
 

Attachments

  • Aircraft.png
    Aircraft.png
    233.3 KB · Views: 30
  • Route.png
    Route.png
    213.8 KB · Views: 15

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
a formula way to do this would be to put a concatenator in Column G of the route sheet
Excel Formula:
=A2&B2
Copy that down
Have a departing airport
arriving airport
lowest runway
Distance
from J2
In lowest runwayuse this formula
Excel Formula:
=IF(OR(K2="",K3=""),"",XLOOKUP(K2&K3,G:G,E:E,0))
and Distance
Excel Formula:
=IF(OR(K2="",K3=""),"",XLOOKUP(K2&K3,G:G,F:F,0))

Then in M2 you can put the following formula
Excel Formula:
=FILTER(Aircraft!A1:A6,(Aircraft!C1:C6<=Route!K4)*(Aircraft!D1:D6>=Route!K5),1)
When you change the Departing and Arriving airports, it will automatically identify the planes you can use in a table beside the data
 
Upvote 0
=FILTER(Aircraft!A1:A6,(Aircraft!C1:C6<=Route!K4)*(Aircraft!D1:D6>=Route!K5),1)
@dermie_72 - Thanks so much for your help on this, super appreciated THANK YOU

I've tried to follow what you said, but i'm obviously doing something wrong..... (sorry) - have attached screen shot of what i've done on the Route Tab

I've tried to upload the base speadsheet on google docs if that helps
Template


Thanks again
 

Attachments

  • Route2 - Solution 1st attempt.png
    Route2 - Solution 1st attempt.png
    111.8 KB · Views: 19
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Formula to help select/suggest the best aircraft for a specific route
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Formula to help select/suggest the best aircraft for a specific route
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Apologies @Fluff, and thanks again for the instruction, appreciated Thank You!
 
Upvote 0
@dermie_72 - Thanks so much for your help on this, super appreciated THANK YOU

I've tried to follow what you said, but i'm obviously doing something wrong..... (sorry) - have attached screen shot of what i've done on the Route Tab

I've tried to upload the base speadsheet on google docs if that helps
Template


Thanks again
In the range that's going from A1:A6, change the a6 to the last row that contains data. Then update the other columns to have the same range. See if that works for you.
 
Upvote 0
For some reason it doesn't look like i can use the '=FILTER' formula i'm using 2016 PP
 
Upvote 0
Evening All, just wondered if anyone had any other thoughts on this please, i'm still a little stuck, thank you
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
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