currently have 8 places going down column A (A2:A9) and the same 8 places across row (B1:I1).
What I need is when I fill in the distances in the table I need is it to find the closest place. However what makes it trickier is if a certain place isnt available it will select the next closest place.
It should look down column A (a2:a9) then choose the lowest or shortest distance that is available based on cell A20 (place name) and Cells b21:i21 (whether they have anything left)
so formula should be something like =hlookup(A20,A1:I9,min(b2:I2),2,0))
then copied across and down, as some of cells may be blank in the row it will get the nearest available.
It may need a table below the current one so the top one will have the distances and the one below the vlookup or hlookup or similar formula
A B C D E F G H
A
B
C
D
E
F
G
H
What I need is when I fill in the distances in the table I need is it to find the closest place. However what makes it trickier is if a certain place isnt available it will select the next closest place.
It should look down column A (a2:a9) then choose the lowest or shortest distance that is available based on cell A20 (place name) and Cells b21:i21 (whether they have anything left)
so formula should be something like =hlookup(A20,A1:I9,min(b2:I2),2,0))
then copied across and down, as some of cells may be blank in the row it will get the nearest available.
It may need a table below the current one so the top one will have the distances and the one below the vlookup or hlookup or similar formula
A B C D E F G H
A
B
C
D
E
F
G
H