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

Get FREE Advanced Excel Exercises with Solutions!

It’s quite common to use a cell reference in Excel. But except the traditional way, there are many ways by which you can reference cells by row and column number in Excel. This article will show you those 4 effective ways to reference 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. ## How to Reference Cell by Row and Column Number in Excel: 4 Easy Ways

Let’s get introduced to our dataset first which represents some employees’ information about an organization. We’ll see 4 suitable ways to reference cell by row and column number in Excel below using this dataset. ### 1. Use INDIRECT and ADDRESS Functions to Reference Cell by Row and Column Number

While using the ADDRESS function within the INDIRECT function, we can reference a cell by row and column number to get a value. We’ll get the value with respect to the Excel sheet’s original row and column number if we use these 2 functions together. This is the advantage of this method. Here, we want to get the value that lies in row number 8 and column number 3 of the current sheet which is David.

Steps:

• Activate Cell D17 and type the following formula in it-
`=INDIRECT(ADDRESS(B17,C17))`
• Finally, just hit the Enter button to get the output. ⏬ Formula Breakdown:

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

“\$C\$8”

Finally, the INDIRECT function will return the value of that cell according to the cell reference and that is-

“David”

### 2. Use INDEX Function to Reference Cell by Row and Column Number

When you want to refer to a cell by row and column number with respect to your given range, not the actual row and column number of your Excel sheet, you can use the INDEX function. Suppose, we have the previous dataset range B4:E14 but we named the range Employee_Info by using the Name Box feature. So, when we put the original row and column numbers into the INDEX function, it’ll give us the wrong result. But putting the row and column numbers with respect to our given range will give us the correct result.

Steps:

• We put the following formula in Cell D17 and it is giving us the wrong result because we put the actual row and column number of our Excel sheet into this 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. • So, put the correct formula in cell D21 to get the correct result with the row and column number with respect to the range Employee_Info
` =INDEX(Employee_Info,B21,C21)`
• Here, B21 and C21 is denoting the row number 5 and column number 2 based on the given range Employee_Info. ### 3. Use Text Reference Within the INDIRECT Function to Reference Cell by Row and Column Number

Again we’ll use the INDIRECT function here. But here we’ll input the row number and column number as text reference. This method is similar to our first method. But the difference is that here we are putting the cell reference manually into the INDIRECT function, as we are using this function alone. You can use this method when you have a small dataset and want to use only one function. But if you have a large dataset, then I’ll recommend the first method.

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. ### 4. Reference Cell by Row and Column Number Applying User Defined Function

In this method, we’ll do the task in a bit different way. First, we’ll make a User Defined Function named CellReference using VBA and then we’ll apply it to our sheet. This method is useful when you are working with Excel versions older than Excel 2007. The INDIRECT, ADDRESS and INDEX functions are not available in Excel versions before Excel 2007. So, in those versions, you can reference cell by row and column number by using this method.

Steps:

• Go to the Developer tab and click on the Visual Basic menu to open the Visual Basic Editor. • Select Module under the Insert tab for inserting the VBA code and put the following code there-
``````Option Explicit
Function CellReference(row As Integer, col As Integer)
CellReference = ActiveSheet.Cells(row, col)
End Function``````
• Then, just save the code by pressing Ctrl + S together, no need to run Just minimize the VBA window and go back to your sheet. • Now have a look that our function is ready to use. We’ll have to give just 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)`
• Finally, just press the Enter button to finish.
• And have a look, we have got the correct value, Johnson. ## Conclusion

I hope the procedures described above will be good enough to reference cell by row and column number in Excel. Feel free to ask any question in the comment section and please give me feedback.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems. Md. Sourov Hossain Mithun

Hello! I am Md. Sourov Hossain Mithun. Currently, I am working at Exceldemy as an Excel and VBA Content Developer. Excel is an amazing software to learn or work. Here, I will post Excel related useful articles. I am a graduate of Bangladesh University of Engineering and Technology. I love to learn new things and work with them. Thank you.

1. Reply This was absolutely prefect, thank you

• Reply Hi, Bruce Ritch! Glad to know it helped you! 🙂

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

• Reply 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. Advanced Excel Exercises with Solutions PDF  