Nearest Location With Xmatch Excel Formula
where location (B5:B12) and distance (C5:C12) are named ranges. Working from the inside out, we are using the XMATCH function to find the position of the nearest location: We do that by setting lookup value to zero (0), lookup array to the distance (C5:C12), and match mode to 1. A match mode value of 1 tells XMATCH to find an exact match or next largest value. Since lookup value is provided as zero (0), XMATCH will find the first distance greater than zero....