Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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

by Allen Wyatt
(last updated October 24, 2015)

8

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, and 2013. 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

Changing Directories in a Macro

Need to specify which directory on your hard drive should be used by a macro? It's easy to do using the ChDir command.

Discover More

Placing Text in Empty Table Cells

Tables are often used to organize information into an understandable format. If your company requires that tables in ...

Discover More

Importing Based on a Partial File Name

A common task for macros is to open and process a file you want imported into your workbook. If you need to identify the ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Determining If a Value is Out of Limits

Need to figure out if a value is outside of some arbitrary limit related to a different value? There are a number of ways ...

Discover More

Deriving Monthly Median Values

When processing huge amounts of data, it can be a challenge to figure out how to derive the aggregate values you need. ...

Discover More

Summing Only the Largest Portion of a Range

Given a range of cells, you may at some time want to calculate the sum of only the largest values in that range. Here is ...

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}] 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 four more than 2?

2016-03-16 15:55:53

John

@Michael (Micky) Avidan,
I very much appreciate your comments and tips and look forward to your astute tips / comments.
I just tried the link: http://screenpresso.com/=PYQ2f , and it no longer works on screenpresso.com .
It returns the message: "Oups, this address is not available or not valid!"
I don't believe the non-availability of the link is related to Mr. Wyatt's website.


2016-03-15 09:03:55

Michael (Micky) Avidan

@MIchael Armstrong,
Sorry about that.
I wil ask Mr. Wyatt for a small space, on his servers, in order for my linked picture to last "for ever".
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
ISRAEL


2016-03-14 08:03:48

MIchael Armstrong

@Micky, your link no longer works.


2016-03-13 13:39:54

Emilio

Allen,
I am by no means a Ninja, but when I have to use excel I do need to locate those power user attributes from my great brain.
I have struggled with pin pointing the cell with the max value now for a while, and you are the first to even explain it.
Now that I have this, I need to find the values in ascending order, from lowest to highest


2015-10-27 05:44:45

Michael (Micky) Avidan

@clas henrik ericsson,
Does the linked picture answer your question ?
http://screenpresso.com/=PYQ2f
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
ISRAEL


2015-10-26 10:33:32

clas henrik ericsson

As William I also want to use the "max adress" and "Min adress" to define a range. This because my data , number of rows are large. I simply want to reduce the "lookup range" amount of unsorted and continuing changed data in order to reduce time to recalculate values/formulas. How do I do to avoid functions as Index to only recalculate within a given range? Or in other words, I firstly define a range (Define Name dynamically)and my formula stick always to this defined range until it is changed for one or another reason. (perhaps because one row have been added/deleted or the sheet have be sorted in another sortorder)


2015-10-24 10:28:14

Larry Mayerhofer

The INDIRECT function allows you to build a formula using text, column letters or row numbers. In this instance all you need to do is wrap the INDIRECT function around the ADDRESS function: =INDIRECT(ADDRESS(MATCH(MAX(A:A),A:A,0),1,4))


2015-10-24 10:12:51

William

OK. The tip works great for finding the address and placing it as text in a cell. But now I want to use this address in a formula but don;t know how.


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.