View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Spiky Spiky is offline
external usenet poster
 
Posts: 622
Default Lookup Function Not in Ascending Order

If I am to input "Milan" into E?, I want H? to be pre-populated. But I'm a
bit unclear with this

=INDEX(return_column,MATCH(lookup,sought_column,0) ) so...

=Index(H:H,MATCH(E?,E:E,0)) does not seem to be correct. Thank you for all
your help, this will really help me out at work, but I don't always have a
lot of time to dedicate to experiment.



Well, if I'm reading you right and this formula goes in the cells in
H, it won't work easily since that is potentially circular or at least
messy. You'd have to have all your locations actually typed into the
first, say, 100 rows, then subsequent rows could access those first
100 with whatever lookup will work. And if you come up with a new city
sometime, no lookup will work at all since it is the first time you
typed it in, there's nothing to look up. You might want to have the
city/country list somewhere else to reference. Perhaps put the
location data far off to the right in BA:BB. Then your original idea
of a VLOOKUP would work.

But regardless, on your INDEX/MATCH question, change the INDEX range
to the whole range and put in a column reference. So this checks
column E, then returns an answer from column H, which is the 4th
column of the range:
=INDEX(E:H,MATCH(E10,E:E,0),4)