Help me solve it without adding any helper cells or changing the structure
There are 8 cities in the country of Eight, A, B, C, D, E, F, G and H. Mr. Z decides to visit each city in his car starting from A. His planned itinerary is
A-->B-->C-->D-->E-->F-->G-->H.
The distance between the cities is given in Table I
<style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @Page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignoreadding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {font-weight:700; text-align:center; vertical-align:middle; border:.5pt solid windowtext;} .xl66 {border:.5pt solid windowtext;} --> </style>[TABLE="width: 783"]
<!--StartFragment--> <colgroup><col width="87" span="9" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 87"] [/TD]
[TD="class: xl65, width: 87"]A[/TD]
[TD="class: xl65, width: 87"]B[/TD]
[TD="class: xl65, width: 87"]C[/TD]
[TD="class: xl65, width: 87"]D[/TD]
[TD="class: xl65, width: 87"]E[/TD]
[TD="class: xl65, width: 87"]F[/TD]
[TD="class: xl65, width: 87"]G[/TD]
[TD="class: xl65, width: 87"]H[/TD]
[/TR]
[TR]
[TD="class: xl65"]A[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]200[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]B[/TD]
[TD="class: xl66, align: right"]200[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]350[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]C[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]350[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]500[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]D[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]500[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]250[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]E[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]250[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]850[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]F[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]850[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]1250[/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]G[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]1250[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]150[/TD]
[/TR]
[TR]
[TD="class: xl65"]H[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]150[/TD]
[TD="class: xl66, align: right"]0[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
Write a formula which takes the number of kms that Mr. Z has traveled from A as the input and displays the name of the city which is nearest to that point.
Mr. Z will enter the number of kms he has traveled from A in cell D30 and the name of the city nearest to the point will be displayed in E30
There are 8 cities in the country of Eight, A, B, C, D, E, F, G and H. Mr. Z decides to visit each city in his car starting from A. His planned itinerary is
A-->B-->C-->D-->E-->F-->G-->H.
The distance between the cities is given in Table I
<style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @Page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignoreadding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {font-weight:700; text-align:center; vertical-align:middle; border:.5pt solid windowtext;} .xl66 {border:.5pt solid windowtext;} --> </style>[TABLE="width: 783"]
<!--StartFragment--> <colgroup><col width="87" span="9" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 87"] [/TD]
[TD="class: xl65, width: 87"]A[/TD]
[TD="class: xl65, width: 87"]B[/TD]
[TD="class: xl65, width: 87"]C[/TD]
[TD="class: xl65, width: 87"]D[/TD]
[TD="class: xl65, width: 87"]E[/TD]
[TD="class: xl65, width: 87"]F[/TD]
[TD="class: xl65, width: 87"]G[/TD]
[TD="class: xl65, width: 87"]H[/TD]
[/TR]
[TR]
[TD="class: xl65"]A[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]200[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]B[/TD]
[TD="class: xl66, align: right"]200[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]350[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]C[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]350[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]500[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]D[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]500[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]250[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]E[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]250[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]850[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]F[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]850[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]1250[/TD]
[TD="class: xl66"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]G[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]1250[/TD]
[TD="class: xl66, align: right"]0[/TD]
[TD="class: xl66, align: right"]150[/TD]
[/TR]
[TR]
[TD="class: xl65"]H[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66, align: right"]150[/TD]
[TD="class: xl66, align: right"]0[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
Write a formula which takes the number of kms that Mr. Z has traveled from A as the input and displays the name of the city which is nearest to that point.
Mr. Z will enter the number of kms he has traveled from A in cell D30 and the name of the city nearest to the point will be displayed in E30