获取单元格中最大的逗号分隔值 [英] Get maximum of comma-separated values in a cell
问题描述
在一个单元格中,我用逗号分隔了数字.我想要这些数字的最大值.
In a cell I have comma-separated numbers. I would like to have the max value of these numbers.
例如:A1 ="2,5,1,4"
eg: A1 = "2,5,1,4"
B1中的公式应返回什么值5?
what should be the formula in B1 to return the value 5?
推荐答案
假定A1
包含1
和999
之间的正整数列表,并用逗号分隔,但没有空格,您可以使用此公式来计算找到当前的最高数字
Assuming A1
contains a list of positive integers between 1
and 999
, separated by commas but with no spaces, you can use this formula to find the highest number present
=MATCH(1000,INDEX(FIND(","&ROW(INDIRECT("1:999"))&",",","&A1&","),0))
搜索介于1到999之间的所有数字,然后MATCH
找出由于我们从1开始与数字本身相同的数字中最后一个(MAX)的位置"
That searches for all numbers between 1 and 999 and MATCH
finds the "position" of the last (MAX) of those which, because we start at 1, is the same as the number itself
这适用于A1中任意数量的任意个数字,只要它们采用指定的格式即可
This works for any amount of numbers within A1, in any order, as long as they are in the specified format
这篇关于获取单元格中最大的逗号分隔值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!