Function to Compare Two Cells and Return the Smaller in Excel
I'd think there'd be something to do this in Excel, because it seems so basic... BUT:
I have two cells and I need to compare them and return the lower of the two. This is very easily done with the following:
=IF(A1 > 开发者_运维知识库A2, A2, A1)
But in a complex formula, this seems insanely unnecessary.
It's also possible to do with:
=SMALL(A1:A2)
But of course my cells are not adjecent and don't make a range.
Thoughts?
You want to use the MIN()
function.
The Excel Min function:
=MIN(A1,A2)
精彩评论