简体   繁体   中英

How can I find the spreadsheet cell reference of MAX() in a range?

With a column range of A1:A20 I have found the largest number with =MAX(A1:A20). How can I find the reference (eg A5) of the MAX() result?

I'm specifically using Google Spreadsheets but hope this is simple enough to be standard across excel and Google Spreadsheets.

=MATCH(MAX(A1:A120),A1:A120,0)

问题是如果你得到多个匹配:它只会给你第一个匹配。

Either :

=ADDRESS(MATCH(MAX($A:$A),$A:$A,0),1)

if you know it's going to be in column A (1)

Or:

=CELL("address",INDEX($A:$A,MATCH(MAX($A:$A),$A:$A,0)))

And yes, it only gives you the first match

You can use something on the lines of the following

=MATCH(MAX(E7:E9),E7:E9)

This will give you the offset from the formula to the biggest number. If you use this in conjunction with ADDRESS you could get the actual cell. However, using offset should probably help you get there if you want to do something on that cell, or another number in the same row as that cell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM