Titanclaymore
New Member
- Joined
- Nov 30, 2013
- Messages
- 16
I have 6 key columns that have data.
In column A there is a list of fleet vessels. e.g. -
Trafalgar
Valkyrie
Valkyrie
Trafalgar
Valkyrie
Dorit
Ocean Star
Rose Cargo
In column G & H are the ports they operate between e.g. -
Los Angeles Singapore
Mobile Southampton
Boston Amsterdam
New Orleans Helsinki
Los Angeles Singapore
Boston Helsinki
Capetown Sydney
Los Angeles Perth
In column K, first cell, has a data list drop down for a port and when this is chosen, this will populate data in column L of all the ports that depart from the chosen port. e.g.
Los Angeles Singapore
Singapore
Perth
In column O, this is looking to pull data and populate the ship that operates these routes
I have used the following formula =IFERROR(INDEX($A$3:$A$49,MATCH($K$2&L2,$G$3:$G$49&$H$3:$H$49,0)),INDEX($A$3:$A$49,MATCH(L2&$K$2,$G$3:$G$49&$H$3:$H$49,0)))
This allows me to pull the ships information into the cells, however when there are two ports that are the same, as in Los Angeles Singapore, it finds the first route that matches, and returns this ship, and for the second route, this is not the correct ship. The first should be Trafalgar and the second Valkyrie
Is there a way which can identify the first route as being returned and then looks to the next matching pair and returns this match?
In column A there is a list of fleet vessels. e.g. -
Trafalgar
Valkyrie
Valkyrie
Trafalgar
Valkyrie
Dorit
Ocean Star
Rose Cargo
In column G & H are the ports they operate between e.g. -
Los Angeles Singapore
Mobile Southampton
Boston Amsterdam
New Orleans Helsinki
Los Angeles Singapore
Boston Helsinki
Capetown Sydney
Los Angeles Perth
In column K, first cell, has a data list drop down for a port and when this is chosen, this will populate data in column L of all the ports that depart from the chosen port. e.g.
Los Angeles Singapore
Singapore
Perth
In column O, this is looking to pull data and populate the ship that operates these routes
I have used the following formula =IFERROR(INDEX($A$3:$A$49,MATCH($K$2&L2,$G$3:$G$49&$H$3:$H$49,0)),INDEX($A$3:$A$49,MATCH(L2&$K$2,$G$3:$G$49&$H$3:$H$49,0)))
This allows me to pull the ships information into the cells, however when there are two ports that are the same, as in Los Angeles Singapore, it finds the first route that matches, and returns this ship, and for the second route, this is not the correct ship. The first should be Trafalgar and the second Valkyrie
Is there a way which can identify the first route as being returned and then looks to the next matching pair and returns this match?