Returns a cell reference as text, given specified row and column numbers. Essential for creating dynamic cell references, building formulas programmatically, and referencing cells based on calculated positions.
Master the fundamentals of Excel ADDRESS function
The ADDRESS function creates a cell reference as text from row and column numbers. It's essential for building dynamic formulas where cell references need to be calculated based on row/column positions rather than hardcoded. ADDRESS is commonly combined with INDIRECT to create dynamic references.
Returns reference as text, not actual cell reference
Supports absolute, relative, and mixed references
Can include sheet name in reference
Supports R1C1 reference style
Function-specific parameters
Function-specific return type
Create cell references based on calculations
Build formulas programmatically
Create references to other sheets dynamically
Combine with INDIRECT for dynamic cell access
Exact matching required
Returns numeric position
Handles missing text gracefully
=ADDRESS(row_num, column_num, abs_num, a1, sheet_text)The row number to use in the cell reference. Must be a positive integer.
The column number to use in the cell reference. 1 = column A, 2 = column B, etc.
Reference type: 1=absolute ($A$1), 2=row absolute ($A1), 3=column absolute (A$1), 4=relative (A1). Default is 1.
Reference style: TRUE or omitted = A1 style, FALSE = R1C1 style. Default is TRUE.
Text specifying the sheet name to include in the reference. If omitted, no sheet name is included.
Cell reference as text (e.g., "$A$1", "A1", "Sheet1!A1")
Description: Creates a cell reference as text from row and column numbers with optional reference type and sheet name
Create simple cell reference
Returns absolute reference $C$5 (row 5, column C). Default abs_num=1 creates absolute reference.
Use ADDRESS function in VBA to create cell references
' Basic ADDRESS in VBA
Range("B1").Value = Application.WorksheetFunction.Address(5, 3)
' Returns: $C$5
' ADDRESS with reference type
Range("B2").Value = Application.WorksheetFunction.Address(10, 2, 4)
' Returns: B10 (relative reference)
' ADDRESS with sheet name
Dim ref As String
ref = Application.WorksheetFunction.Address(5, 3, 1, True, "Data")
Range("B3").Value = ref
' Returns: Data!$C$5
' Create dynamic reference and use with INDIRECT
Sub CreateDynamicReference()
Dim rowNum As Integer, colNum As Integer
Dim cellRef As String
rowNum = 10
colNum = 5
cellRef = Application.WorksheetFunction.Address(rowNum, colNum, 4)
Range("A1").Value = Application.WorksheetFunction.Indirect(cellRef)
End SubCreate cell references based on calculated row/column positions
Build formulas programmatically with variable references
Create references to cells in other sheets dynamically
Create range references with calculated start/end cells
ADDRESS returns #VALUE! when row_num or column_num is not numeric
=ADDRESS(ROW(), COLUMN())Solution: Ensure row_num and column_num are numbers. Use ROW(), COLUMN(), or numeric values. Check for text values that need conversion.
ADDRESS creates wrong reference type (absolute vs relative)
=ADDRESS(5, 3, 4) for relativeSolution: Check abs_num parameter: 1=absolute, 2=row absolute, 3=column absolute, 4=relative. Default is 1 (absolute).
ADDRESS works but INDIRECT(ADDRESS(...)) returns error
=INDIRECT(ADDRESS(ROW(), COLUMN()))Solution: Verify ADDRESS returns valid reference text. Check for invalid sheet names, negative row/column numbers, or circular references.
Sheet name not appearing correctly in reference
=ADDRESS(5, 3, 1, TRUE, "Sheet Name")Solution: Ensure sheet name is valid and quoted if it contains spaces. Use exact sheet name as it appears in workbook.