Ex.1
13 15 17 answer is 15

Ex.2
12 16 13 answer is 13

Ex.3
11 11 15 answer is 11

if 2 nos are equal the answer is the 2 equal,
if all nos are different the answer is middle

how to do this? also in excel

tnx