If you have a very large dataset, it can be quite time-consuming to find the last cell with value in a row in your Excel dataset. In this article, I’ll introduce you to 6 methods by which you can easily find the last cell with value in a row in Excel.
Consider the following dataset. Here Information about different customers who have applied for a bank loan is given. Now we will find the last cell with data in a row using this dataset.
Let’s see how we can perform this task in 6 different ways.
1. Using Keyboard Shortcut to Find the Last Cell with Value in a Row in Excel
The easiest way to find the last cell with a value in a row is by using the keyboard command.
Just click on the row’s first cell and press CTRL+ Right Arrow Key.
Your cursor will move to the last non-empty cell in that row.
2. Getting the Last Cell with Value in a Row by Using OFFSET Function in Excel
If you know the number of columns and rows of your dataset, you can find the last cell value in any row by using the OFFSET function. To find out the last cell value in Row 6, type the formula in an empty cell,
- B4 = First cell of the dataset
- 2 = Number of the row of your dataset excluding the first row
- 7 = Number of the column of your dataset excluding the first column
- 1 = cell height
- 1 = cell width
Press ENTER and you will find the value of the last cell of Row 6, in your selected cell.
3. Using Excel INDEX and COUNTA Functions to Find the Last Non-Blank Cell in a Row
- 5:5 = Row 5
- B5:I12 = Array
- 1 = row_num
You will find the value of the last cell of Row 5, in your selected cell.
🔎 Formula Breakdown
↪️ The COUNTA function counts the number of cells in a range that are non-empty.
COUNTA(5:5) returns the total number of non-empty cells in Row 5 => 8
↪️ INDEX(B5:I12,1,COUNTA(5:5)) = INDEX(B5:I12,1,8) = 23
So, final Output => 23
4. Using the MATCH Function to Find the Last Cell with Value in a Row in Excel
Using the MATCH function, you can find the number of the last cell with a value in any particular row.
Here, our lookup cell value is 25 which exists in Row 10. We want to find the relative position of 25 in Row 10, type the following formula in any of the empty cells,
- D14 = lookup_value
- 10:10 = Row 10
- 0 = Exact match
You will find the number of the last non-empty cell of Row 10, in your selected cell.
5. Finding the Last Cell Value in a Row Using Excel LOOKUP Function
You can find the last cell value of the last row by using the LOOKUP function. Type the formula in an empty cell,
Here, I:I = Last column of the dataset
After pressing ENTER, You will find the value of the last cell of the last row of the dataset, in your selected cell.
6. Applying HLOOKUP Function to Find Last Cell with Value in a Row in Excel
Using the HLOOKUP Function is another way to find the value of the last cell of any row. Now we will find the last cell of Row 8 in our dataset. To find the value, type the formula in an empty cell,
- I4= Last column of the first row (Reference cell)
- B4:I12 = Range of Dataset
- 5 = 5th Row of our dataset including the reference cell’s row
- FALSE = Exact Match
You will find the value of the last cell of Row 8, in your selected cell.
Download Practice Workbook
So, we’re done! You can follow any of the ways described above to find the last cell with value in a row in Excel. Please leave a comment if you face any unexpected situations. To get acquainted with more Excel features and functions, kindly visit our website. We always try to provide quick solutions to your problems.