minMax column and row calc