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.

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


1

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Where Is that Name?

Want to easily see the location of named ranges in your worksheet? It's easy; all you need to do is use the familiar Zoom ...

Discover More

Adjusting Spell Check for Internet Addresses

When you check the spelling of worksheet data, you may want to spell checker to either ignore or check Internet addresses ...

Discover More

Swapping Two Strings

Part of developing macros is learning how to use and manipulate variables. This tip examines a technique you can use to ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Calculating Statistical Values on Different-Sized Subsets of Data

Discovering different ways to analyze your data can be a challenge. Here's how to work with arbitrary subsets of a large ...

Discover More

Counting Alphabetic Characters in a String

Need to find out how many times a certain letter appears in a text string? It's easy to do if you rely on the SUBSTITUTE ...

Discover More

Determining Combinations to Make a Total

If you have a range of cells that contain values, you may wonder which combinations of those cells should be used to meet ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

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


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.