Written by Allen Wyatt (last updated January 14, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365
Excel allows you to easily see the location of the currently selected cell by examining the contents of the Name Box, to the left of the Formula Bar. This is fine and good, but there are times when you would like to have the address of a cell actually in a cell. For instance, you may want cell A1 to contain the address of the currently selected cell. This means that if cell E4 were selected, then A1 would contain its address, or $E$4. If you then pressed the right-arrow key, then the contents of A1 would change to $F$4.
You can grab the address of the currently selected cell by using the CELL worksheet function, in this manner:
=CELL("Address")
You should note that this function doesn't result in the contents of the cell changing every time you move to a different cell. Instead, the function is updated only when the workbook is recalculated, either by changing something in the worksheet or by pressing F9.
If, instead, you need to have "real time" reporting of the selected cell, you'll need to resort to using a macro. Follow these steps:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address End Sub
Now, as you move about this single worksheet, the contents of A1 should be constantly updated to reflect your location.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12400) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Displaying the Selected Cell's Address.
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!
Need to click on a cell and have it replaced with an "X"? Macros make it easy to do, as illustrated in this tip.
Discover MoreThe security features built into Excel allow you to digitally sign your macros so that users can rest assured that they ...
Discover MoreHow Excel uses templates is different than how Word uses templates. This tip looks at those differences and discusses ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-01-14 10:55:49
J. Woolley
When this Tip refers to the "selected" cell it means the "active" cell. A Selection can have more than one cell, but only one of those cells is Active. When using the mouse, the Active cell is usually the first cell selected in the last selected contiguous range of cells. You can identify the Active cell by borders and shading. It is interesting to use this Tip's formula or macro to review the difference between "selected" and "active" cells.
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 © 2025 Sharon Parq Associates, Inc.
Comments