Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
This article describes the formula syntax and usage of the ADDRESS function in Microsoft Excel. Find links to information about working with mailing addresses or creating mailing labels in the See Also section.
Description
You can use the ADDRESS function to obtain the address of a cell in a worksheet, given specified row and column numbers. For example, ADDRESS(2,3) returns $C$2. As another example, ADDRESS(77,300) returns $KN$77. You can use other functions, such as the ROW and COLUMN functions, to provide the row and column number arguments for the ADDRESS function.
Syntax
ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])
The ADDRESS function syntax has the following arguments:
-
row_num Required. A numeric value that specifies the row number to use in the cell reference.
-
column_num Required. A numeric value that specifies the column number to use in the cell reference.
-
abs_num Optional. A numeric value that specifies the type of reference to return.
abs_num |
Returns this type of reference |
1 or omitted |
Absolute |
2 |
Absolute row; relative column |
3 |
Relative row; absolute column |
4 |
Relative |
-
A1 Optional. A logical value that specifies the A1 or R1C1 reference style. In A1 style, columns are labeled alphabetically, and rows are labeled numerically. In R1C1 reference style, both columns and rows are labeled numerically. If the A1 argument is TRUE or omitted, the ADDRESS function returns an A1-style reference; if FALSE, the ADDRESS function returns an R1C1-style reference.
Note: To change the reference style that Excel uses, click the File tab, click Options, and then click Formulas. Under Working with formulas, select or clear the R1C1 reference style check box.
-
sheet_text Optional. A text value that specifies the name of the worksheet to be used as the external reference. For example, the formula =ADDRESS(1,1,,,»Sheet2″) returns Sheet2!$A$1. If the sheet_text argument is omitted, no sheet name is used, and the address returned by the function refers to a cell on the current sheet.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Formula |
Description |
Result |
=ADDRESS(2,3) |
Absolute reference |
$C$2 |
=ADDRESS(2,3,2) |
Absolute row; relative column |
C$2 |
=ADDRESS(2,3,2,FALSE) |
Absolute row; relative column in R1C1 reference style |
R2C[3] |
=ADDRESS(2,3,1,FALSE,»[Book1]Sheet1″) |
Absolute reference to another workbook and worksheet |
‘[Book1]Sheet1’!R2C3 |
=ADDRESS(2,3,1,FALSE,»EXCEL SHEET») |
Absolute reference to another worksheet |
‘EXCEL SHEET’!R2C3 |
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
This tutorial demonstrates how to use the ADDRESS Function in Excel and Google Sheets to return a cell address as text.
What is the ADDRESS Function?
The ADDRESS Function Returns a cell address as text.
Usually, in a spreadsheet, we provide a cell reference, and a value from that cell is returned. Instead, the ADDRESS Function builds the name of a cell.
The address can be relative or absolute, in A1 or R1C1 style, and may or may not include the sheet name.
ADDRESS – Basic Example
Let’s say that we want to build a reference to the cell in 4th column and 1st row, aka cell D1. We can use the layout pictured here:
Our formula in A3 is simply
=ADDRESS(B1, B2)
Note: By default the ADDRESS Function returns an absolute cell reference. By updating an optional argument we can change the cell references from absolute to relative. Let’s review this and other inputs to the ADDRESS Function…
ADDRESS Function Syntax and Inputs:
=ADDRESS(row_num,column_num,abs_num,C1,sheet_text)
row_num – The row number for the reference. Example: 5 for row 5.
col_num – The column number for the reference. Example: 5 for Column E. You can not enter “E” for column E
abs_num – [optional] A number representing if the reference should have absolute or relative row/column references. 1 for absolute. 2 for absolute row/relative column. 3 for relative row/absolute column. 4 for relative.
a1 – [optional]. A number indicating whether to use standard (A1) cell reference format or R1C1 format. 1/TRUE for Standard (Default). 0/FALSE for R1C1.
sheet_text – [optional] The name of the worksheet to use. Defaults to current sheet.
ADDRESS with INDIRECT
We can combine ADDRESS with the INDIRECT Function. Consider this layout, where we have a list of items in column D.
We can generate a reference to D1 like so
=ADDRESS(B1, B2)
=$D$1
By putting the address function inside an INDIRECT function, we’ll be able to use the generated cell reference and use it in a practical way. The INDIRECT will take the reference of “$D$1” and use it to fetch the value from that cell.
=INDIRECT(ADDRESS(B1, B2)
=INDIRECT($D$1)
="Apple"
Note: While the above gives a good example of making the ADDRESS Function useful, it’s not a good formula to use normally. It required two functions, and because of the INDIRECT it will be volatile in nature. A better alternative would have been to use the INDEX Function like this:
=INDEX(1:1048576, B1, B2)
Address of Specific Value
Sometimes when you have a large list of items, you need to know the location of an item in the list. Consider this table of scores from students. We’ve gone ahead and calculated the min, median, and max values of these scores in cells E2:G2.
Let’s say we wanted to find these values. We have a two options:
- Filter our table for each of these items.
- Use the MATCH Function with ADDRESS. Remember that MATCH will return the relative position of a value within a range.
Our formula in E3 then is:
=ADDRESS(MATCH(E2, $B:$B, 0), 2)
We can copy this same formula across to G3, and only the E2 reference will change since it’s the only relative reference. Looking back at E3, the MATCH function was able to find the value of 98 in the 5th row of column B. Our ADDRESS function then used this to build the full address of “$B$5”.
Translate Column Letters from Numbers
So far, all of the examples have returned an absolute reference. Let’s return a relative reference instead.
Below, in column B, we want to calculate the column letter corresponding to the column number in column A.
We will use the ADDRESS Function to return a reference on row 1 in relative format, and then we’ll remove the “1” from the text string so that we just have the letter(s) left. Consider in our table row 3, where our input is 13. Our formula in B3 is
=SUBSTITUTE(ADDRESS(1, A3, 4), "1", "")
Note that we’ve given the 3rd argument within the ADDRESS function, which controls the relative vs. absolute referencing. The ADDRESS function will output “M1”, and then the SUBSTITUTE function removes the “1” so that we are left with just the “M”.
Find the Address of Named Ranges
In Excel, you can name range or ranges of cells, allowing you to simply refer to the named range instead of the cell reference.
Most named ranges are static, meaning they always refer to the same range. However, you can also create dynamic named ranges that change in size based on some formula(s).
With a dynamic named range, you might need to know the exact address that your named range is pointing to. We can do this with the ADDRESS Function.
In this example, we’ll look at how to define the address for our named range called “Grades”.
Let’s bring back our table from before:
To get the address of a range, you need to know the top left cell and the bottom left cell. The first part is easy enough to accomplish with the help of the ROW and COLUMN functions. Our formula in E1 can be
=ADDRESS(ROW(Grades), COLUMN(Grades))
The ROW Function returns the row of the first cell in our range (which will be 1), and the COLUMN will do the same similarly for the column (also 1).
This formula will get the bottom-right cell
=ADDRESS(ROWS(Grades)-ROW(Grades)+1, COLUMNS(Grades)-COLUMN(Grades)+1)
We used the ROWS and COLUMNS functions to calculate the height and width of the range. By subtracting the first row and column numbers, we calculate the last cell in the range
Finally, to put it all together into a single string, we can simply concatenate the values together with a colon in the middle. Formula in E3 can be
=E1 & ":" & E2
Note: While we were able to determine the address of the range, our ADDRESS function determined whether to list the references as relative or absolute. Your dynamic ranges will have relative references that this technique won’t pick up.
2nd Note: This technique only works on a continuous names range. If you had a named range that was defined as something like this formula
=A1:B2, A5:B6
then the technique above would result in errors.
ADDRESS function in Google Sheets
The ADDRESS function works exactly the same in Google Sheets as in Excel.
When using lookup formulas in Excel (such as VLOOKUP, XLOOKUP, or INDEX/MATCH), the intent is to find the matching value and get that value (or a corresponding value in the same row/column) as the result.
But in some cases, instead of getting the value, you may want the formula to return the cell address of the value.
This could be especially useful if you have a large data set and you want to find out the exact position of the lookup formula result.
There are some functions in Excel that designed to do exactly this.
In this tutorial, I will show you how you can find and return the cell address instead of the value in Excel using simple formulas.
Lookup And Return Cell Address Using the ADDRESS Function
The ADDRESS function in Excel is meant to exactly this.
It takes the row and the column number and gives you the cell address of that specific cell.
Below is the syntax of the ADDRESS function:
=ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])
where:
- row_num: Row number of the cell for which you want the cell address
- column_num: Column number of the cell for which you want the address
- [abs_num]: Optional argument where you can specify whether want the cell reference to be absolute, relative, or mixed.
- [a1]: Optional argument where you can specify whether you want the reference in the R1C1 style or A1 style
- [sheet_text]: Optional argument where you can specify whether you want to add the sheet name along with the cell address or not
Now, let’s take an example and see how this works.
Suppose there is a dataset as shown below, where I have the Employee id, their name, and their department, and I want to quickly know the cell address that contains the department for employee id KR256.
Below is the formula that will do this:
=ADDRESS(MATCH("KR256",A1:A20,0),3)
In the above formula, I have used the MATCH function to find out the row number that contains the given employee id.
And since the department is in column C, I have used 3 as the second argument.
This formula works great, but it has one drawback – it won’t work if you add the row above the dataset or a column to the left of the dataset.
This is because when I specify the second argument (the column number) as 3, it’s hard-coded and won’t change.
In case I add any column to the left of the dataset, the formula would count 3 columns from the beginning of the worksheet and not from the beginning of the dataset.
So, if you have a fixed dataset and need a simple formula, this will work fine.
But if you need this to be more fool-proof, use the one covered in the next section.
Lookup And Return Cell Address Using the CELL Function
While the ADDRESS function was made specifically to give you the cell reference of the specified row and column number, there is another function that also does this.
It’s called the CELL function (and it can give you a lot more information about the cell than the ADDRESS function).
Below is the syntax of the CELL function:
=CELL(info_type, [reference])
where:
- info_type: the information about the cell you want. This could be the address, the column number, the file name, etc.
- [reference]: Optional argument where you can specify the cell reference for which you need the cell information.
Now, let’s see an example where you can use this function to look up and get the cell reference.
Suppose you have a dataset as shown below, and you want to quickly know the cell address that contains the department for employee id KR256.
Below is the formula that will do this:
=CELL("address", INDEX($A$1:$D$20,MATCH("KR256",$A$1:$A$20,0),3))
The above formula is quite straightforward.
I have used the INDEX formula as the second argument to get the department for the employee id KR256.
And then simply wrapped it within the CELL function and asked it to return the cell address of this value that I get from the INDEX formula.
Now here is the secret to why it works – the INDEX formula returns the lookup value when you give it all the necessary arguments. But at the same time, it would also return the cell reference of that resulting cell.
In our example, the INDEX formula returns “Sales” as the resulting value, but at the same time, you can also use it to give you the cell reference of that value instead of the value itself.
Normally, when you enter the INDEX formula in a cell, it returns the value because that is what it’s expected to do. But in scenarios where a cell reference is required, the INDEX formula will give you the cell reference.
In this example, that’s exactly what it does.
And the best part about using this formula is that it is not tied to the first cell in the worksheet. This means that you can select any data set (which could be anywhere in the worksheet), use the INDEX formula to do a regular look up and it would still give you the correct address.
And if you insert an additional row or column, the formula would adjust accordingly to give you the correct cell address.
So these are two simple formulas that you can use to look up and find and return the cell address instead of the value in Excel.
I hope you found this tutorial useful.
Other Excel tutorials you may also like:
- Lookup and Return Values in an Entire Row/Column in Excel
- Find the Last Occurrence of a Lookup Value a List in Excel
- Lookup the Second, the Third, or the Nth Value in Excel
- How to Reference Another Sheet or Workbook in Excel
- Lookup and Return Values in an Entire Row/Column in Excel
Purpose
Create a cell address from a row and column number
Return value
A cell address in the current or given worksheet.
Usage notes
The ADDRESS function returns the address for a cell based on a given row and column number. For example, =ADDRESS(1,1) returns $A$1. ADDRESS can return a relative, mixed, or absolute reference, and can be used to construct a cell reference inside a formula. Note that ADDRESS returns a reference as a text value. If you want to use this text inside a formula reference, you will need to coerce the text to a proper reference with the INDIRECT function.
Note: ADDRESS is a special purpose function and is not necessary in most formulas. For example, to retrieve a value at a specific row and column location, you can use INDEX and MATCH.
The ADDRESS function takes five arguments: row, column, abs_num, a1, and sheet_text. Row and column are required, other arguments are optional. The abs_num argument controls whether the address returned is relative, mixed, or absolute, with a default value of 1 for absolute. The a1 argument is a Boolean that toggles between A1 and R1C1 style references with a default value of TRUE for A1 style references. Finally, the sheet_text argument is meant to hold a sheet name that will be prepended to the address.
ABS options
The table below shows the options available for the abs_num argument for returning a relative, mixed, or absolute address.
abs_num | Result |
---|---|
1 (or omitted) | Absolute ($A$1) |
2 | Absolute row, relative column (A$1) |
3 | Relative row, absolute column ($A1) |
4 | Relative (A1) |
Examples
Use ADDRESS to create an address from a given row and column number. For example:
=ADDRESS(1,1) // returns $A$1
=ADDRESS(1,1,4) // returns A1
=ADDRESS(100,26,4) // returns Z100
=ADDRESS(1,1,1,FALSE) // R1C1
=ADDRESS(1,1,4,TRUE,"Sheet1") // returns Sheet1!A1
Provide a cell reference by taking a row and column number
What is the Cell ADDRESS Function?
The cell ADDRESS Function[1] is categorized under Excel Lookup and Reference functions. It will provide a cell reference (its “address”) by taking the row number and column letter. The cell reference will be provided as a string of text. The function can return an address in a relative or absolute format and can be used to construct a cell reference inside a formula.
As a financial analyst, cell ADDRESS can be used to convert a column number to a letter, or vice versa. We can use the function to address the first cell or last cell in a range.
Formula
=ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])
The formula uses the following arguments:
- Row_num (required argument) – This is a numeric value specifying the row number to be used in the cell reference.
- Column_num (required argument) – A numeric value specifying the column number to be used in the cell reference.
- Abs_num (optional argument) – This is a numeric value specifying the type of reference to return:
Abs_num | Returns this type of reference |
---|---|
1 or omitted | Absolute |
2 | Absolute row; relative column |
3 | Absolute column; relative row |
4 | Relative |
4. A1(optional argument) – This is a logical value specifying the A1 or R1C1 reference style. In R1C1 reference style, both columns and rows are labeled numerically. It can either be TRUE (reference should be A1) or FALSE (reference should be R1C1).
When omitted, it will take on the default value TRUE (A1 style).
- Sheet_text (optional argument) – Specifies the sheet name. If we omit the argument, it will take the current worksheet.
How to use the ADDRESS Function in Excel?
To understand the uses of the cell ADDRESS function, let us consider a few examples:
Example 1
Suppose we wish to convert the following numbers into Excel column references:
The formula to use will be:
We get the results below:
The ADDRESS function will first construct an address containing the column number. It was done by providing 1 for row number, a column number from B6, and 4 for the abs_num argument.
After that, we use the SUBSTITUTE function to take out the number 1 and replace with “”.
Example 2
The ADDRESS function can be used to convert a column letter to a regular number, e.g., 21, 100, 126, etc. We can use a formula based on the INDIRECT and COLUMN functions.
Suppose we are given the following data:
The formula to use will be:
We get the results below:
The INDIRECT function transforms the text into a proper Excel reference and hands the result off to the COLUMN function. Then, the COLUMN function evaluates the reference and returns the column number for the reference.
A few notes about the Cell ADDRESS Function
- If we wish to change the reference style that Excel uses, we should go to the File tab, click Options, and then select Formulas. Under Working with formulas, we can select or clear the R1C1 reference style checkbox.
- #VALUE! error – Occurs when any of the arguments are invalid. We would get this argument if:
- The row_num is less than 1 or greater than the number of rows in the spreadsheet;
- The column_num is less than 1 or greater than the number of columns in the spreadsheet; or
- Any of the supplied row_num, column_num or [abs_num] arguments are non-numeric or the supplied [a1] argument is not recognized as a logical value.
Click here to download the sample Excel file
Additional Resources
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional CFI resources:
- Excel Functions for Finance
- Advanced Excel Formulas Course
- Advanced Excel Formulas You Must Know
- Excel Shortcuts for PC and Mac
- See all Excel resources
Article Sources
- ADDRESS Function