Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Cell Address of a Maximum Value.
Written by Allen Wyatt (last updated January 29, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Barry has a worksheet with several thousand rows. They are unsorted and must remain unsorted. He can use the MAX function on the column and get the maximum value in that column. However, he also wants to know the address of the first cell in the column that contains this maximum value.
There are a number of ways that you can determine the address of the maximum value. One way is to use the ADDRESS function in conjunction with the MAX function, in the following manner:
=ADDRESS(MATCH(MAX(A:A),A:A,0),1,4)
The MATCH function is used to find where in the range (column A) the maximum value resides, and then the ADDRESS function returns the address of that location. A shorter version of the macro leaves off the ADDRESS function, instead being "hardwired" to return an address in column A:
="A"&MATCH(MAX(A:A),A:A,0)
Still another way to get the desired address is with a formula such as this:
=CELL("ADDRESS",INDEX(A:A,MATCH(MAX(A:A),A:A,0)))
This formula uses the CELL function, in conjunction with INDEX, to return the address of the cell that matches the maximum value in the column.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11441) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Cell Address of a Maximum Value.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
If you want to figure out the sum of all cells that contain formulas, there are a couple of ways you can go about it. ...
Discover MoreIf you need to analyze some text to determine if it contains accented characters, there are a couple of ways you can ...
Discover MoreDo you ever have a need to return just a few digits out of a number? This tip shows different formulas you can use to ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-01-29 14:59:01
Bryan
A different way is to break in into 2 things. One is what being searched for and the other result. The listed NSWER is good but is harder to expand.
Example imagine one cell for chose, in this case MAX, but other choices like MIN or user MANUAL input value would allow additional options.
Since the originator only wanted the first match, the 2nd cell would be First Match is still good. A third cell for count would allow knowing how many different cells have the same value.
Bryan
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments