Format distance in cell