Sure, you just want the MIN of the difference between the market data min and your salary range medians. You could check out the statistical functions (I'm no expert there) or just use a helper column with the absolute value of the difference and then look up the range. For example, put your data in columns B and C (B1 through B4 in your example for the letter and C1 through C4 for the $). Use column A as your helper with
copied down (obviously referencing 37213 as a cell). Then you want to use a lookup:
Bookmarks