How to Reference Cell by Row and Column Number in Excel (4 Methods)

This article will show you four ways to reference a cell by row and column number in Excel with sharp steps and vivid illustrations. In the following overview image, you’ll see different methods to reference cell by row and column number in Excel.

Overview image of showing referencing cell by row and column number in different cases


All of the below methods use the following dataset:

Dataset for referencing cell by row and column number in Excel


Method 1-  Use INDIRECT and ADDRESS Functions to Reference Cell by Row and Column Number

Steps:

  • Highlight Cell D17 and type the following formula in it-
=INDIRECT(ADDRESS(B17,C17))
  • Hit the Enter button to get the output.

Inserting INDIRECT and ADDRESS functions as a formula to reference cell by row and column number

⏬ Formula Breakdown:

➥ ADDRESS(B17,C17))

The ADDRESS function will return the default cell reference for row number 8 and column number 3. So it will return as-

“$C$8”

➥ INDIRECT(ADDRESS(B17,C17))

The INDIRECT function will return the value of that cell according to the cell reference:

“David”

Read More: How to Display Text from Another Cell in Excel


Method 2 – Use the INDEX Function to Reference Cell by Row and Column Number

Steps:

  • As we put the below formula in Cell D17 we’re getting the wrong result as we’ve put the actual row and column number of our Excel sheet into the formula:
=INDEX(Employee_Info,B17,C17)
  • Here, the Employee_Info part is the range of our dataset, from where the INDEX function will search for the value. And B17 and C17 is denoting the actual row number 8 and column number 3 of your Excel sheet.

Inserting INDEX function to reference cell by actual row and column number

  • To fix this, enter the following formula in D21 to get the correct result for Employee_Info
 =INDEX(Employee_Info,B21,C21)
  • B21 and C21 denote the row number 5 and column number 2 based on the given range Employee_Info.

Inserting INDEX function to reference cell by row and column number with respect to given range

Read More: How to Reference Text in Another Cell in Excel


Method 3 – Use Text Reference Within the INDIRECT Function to Reference Cell by Row and Column Number

Steps:

  • In Cell D17, type the following formula and hit the Enter button for the result–
=INDIRECT("R" & 7 & "C" & 3,FALSE)
  • This function will search for the value from row number 7 and column number 3 which is Johnson and brings it here. We put FALSE because we are using the R1C1 style here.

Inserting INDIRECT function to reference cell by actual row and column number using text reference

Read More: How to Use Variable Row Number as Cell Reference in Excel


Method 4 – Reference Cell by Row and Column Number Applying User Defined Function

Steps:

  • Go to the Developer tab and click on the Visual Basic menu to open the Visual Basic Editor.

Selecting Visual Basic menu under the Developer tab

  • Select Module under the Insert tab.
  • Insert the following VBA code:
Option Explicit
Function CellReference(row As Integer, col As Integer)
    CellReference = ActiveSheet.Cells(row, col)
End Function
  • Save the code by pressing Ctrl + S together.
  • Minimize the VBA window and go back to your sheet.

Inserting VBA code into a module under the Visual Basic Editor window

  • The formula is ready to use. However, you have to give the row number and column number and it will return the value according to that reference.
  • To get the value from Cell C7, type the following formula in Cell D17
=CellReference(B17,C17)
  • Press the Enter button to finish.
  • This delivers the correct value – Johnson.

Inserting CellReference function as a User Defined Function to reference cell by row and column number

Read More: How to Find and Replace Cell Reference in Excel Formula


Download Practice Workbook

You can download the free Excel template from here and practice on your own.


Related Articles


<< Go Back to Cell Reference in ExcelExcel Formulas | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Sourov Hossain Mithun
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio

4 Comments
  1. This was absolutely prefect, thank you

  2. HI, Can you please give examples of why you would use one of these ways over another?

    • Reply Md. Sourav Hossain Mithun
      Md. Sourov Hossain Mithun Mar 28, 2023 at 4:25 PM

      Hello MISTI,
      Thanks for your feedback. I hope you will be glad to know that, we have updated our methods according to related examples. Now it will help you to understand the specific use of every method.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo