more info for x-y lookup problem


Posted by gordon on June 14, 2001 6:52 PM

A2:A30 CONTAINS CITY NAMES AS TEXT, B1:AD1 CONTAINS THE EXACT SAME CITY NAMES AS TEXT. MILEAGE DATA IS CONTAINED IN CELLS B2:AD30 AS THE MILES ((LIKE A MAP KEY), LOOKUP MILEAGE BETWEEN CITY'S)((IN THE BACK OF A USA MAP BOOK)). THE INPUT DATA (CITY NAME)FOR X IS CONTAINED IN A32 AS TEXT. THE INPUT DATA FOR Y IS CONTAINED IN A33 AS TEXT. WITH 30 CITY'S ON THE X AXIS AND THE 30 CITY'S ON THE Y AXIS. HOW DO I OBTAIN THE DATA(B2:AD30)OF THE MILEAGE BETWEEN CITY'S, ASSUMING THAT THE INPUT DATA @B32&B33,B34&B35 ECT... WILL CHANGE FOR EACH NEW INPUT. AND PUT THE RESULT IN A34&A35,A36&A37 ECT...



Posted by Russell on June 15, 2001 9:04 AM

Not exactly sure what you were saying at the end there, but try this:

If you have city1 in cell A32 and city2 in cell A33, you could use this formula (say in cell B33):

=INDEX($A$1:$AD$30,MATCH(A32,$A$1:$AD$1,0),MATCH(A33,$A$1:$A$30,0))