Table:
0
A
B
C
D
E
1
Line Name
Date Closed
NIMT Junction
Terminus
Length
2
Auckland–Newmarket Line
Open
Quay Park Junction
Newmarket Junction
2.5km
3
North Auckland Line
Open
Westfield Junction
Otiria Junction
280km
4
Manukau Branch
Open
Wiri Junction
Manukau
2.5km
5
Mission Bush Branch
Open
Paerata Junction
Mission Bush
17km
6
Kimihia Branch
Open
Huntly North
Kimihia Mine
2.75km
7
Rotowaro Branch
Open
Huntly
Rotowaro
8.5km
8
Waipa Railway and Coal Co. line
19-5-1958
Ngaruawahia
Wilton Collieries
10.5km
9
East Coast Main Trunk Railway
Open
Frankton Junction
Kawerau
180km
10
Stratford–Okahukura Line
Mothballed 2009
Okahukura Junction
Stratford
144km
11
Raetihi Branch
1-1-1968
Ohakune Junction
Raetihi
13km
12
Marton–New Plymouth Line
Open
Marton Junction
Breakwater (New Plymouth)
212km
13
Taonui Branch
14-8-1895
Taonui
Colyton
3.5km
14
Palmerston North–Gisborne Line
Open
Roslyn Junction
Gisborne
391km
15
Foxton Branch
18-7-1959
Longburn Junction
Foxton
31km
16
Wairarapa Line
Open
Distant Junction (Wellington)
Woodville
170km
17
Johnsonville Branch
Open
Wellington Junction
Johnsonville
10km
18
Te Aro Branch
23-4-1917
Wellington (Lambton)
Te Aro
1.77km

Questions and formulas:
Question: What Line has Ohakune Junction as its NIMT?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,C1="ohakune junction"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E18,C2:C18="ohakune junction"),1))
Level: medium
Question: What line has Newmarket Junction terminus?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,D1="newmarket junction"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E18,D2:D18="newmarket junction"),1))
Level: medium
Question: What terminus is 3.5km in lenght?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,E1="3.5km"),4))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E18,E2:E18="3.5km"),4))
Level: medium
Question: What line has Junction of Huntly NIMT
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,C1="huntly"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E18,C2:C18="huntly"),1))
Level: medium