开发者

Function to Compare Two Cells and Return the Smaller in Excel

开发者 https://www.devze.com 2023-01-04 04:30 出处:网络
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

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消