Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Self-reference for cell, column and row in worksheet functions

Tags:

In a worksheet function in Excel, how do you self-reference the cell, column or row you're in?

like image 808
Lance Roberts Avatar asked Jun 13 '11 19:06

Lance Roberts


People also ask

How do you reference a cell row and column in Excel?

The Excel 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 an address in relative, mixed, or absolute format, and can be used to construct a cell reference inside a formula.

How do you make a cell reference itself in Excel?

Click the cell in which you want to enter the formula. In the Formula Bar, type = (equal sign). Do one of the following: Reference one or more cells To create a reference, select a cell or range of cells on the same worksheet.

How do you reference a cell in a row function?

It is a built-in function and takes only one argument as the reference. The method to use this function is as follows: =ROW( Value ). It will only show the cell's row number, not its value. For example, =ROW(A5) returns 5 because A5 is the fifth row in the Excel spreadsheet.

What are the 3 types of cell references in Excel?

Now there are three kinds of cell references that you can use in Excel: Relative Cell References. Absolute Cell References. Mixed Cell References.


1 Answers

For a cell to self-reference itself:

INDIRECT(ADDRESS(ROW(), COLUMN())) 

For a cell to self-reference its column:

INDIRECT(ADDRESS(1,COLUMN()) & ":" & ADDRESS(65536, COLUMN())) 

For a cell to self-reference its row:

INDIRECT(ADDRESS(ROW(),1) & ":" & ADDRESS(ROW(),256)) or INDIRECT("A" & ROW() & ":IV" & ROW()) 

The numbers are for 2003 and earlier, use column:XFD and row:1048576 for 2007+.

Note: The INDIRECT function is volatile and should only be used when needed.

like image 65
Lance Roberts Avatar answered Sep 30 '22 07:09

Lance Roberts