Rows in Excel (Select, Insert-Delete, Hide-Unhide, Group-Ungroup, Move, Modify Size, Etc.)

Get FREE Advanced Excel Exercises with Solutions!

Rows in Excel provide a structured way for all the users to organize and reference data in an Excel worksheet.

In this article, you will learn every detail about rows in Excel.

Rows in Excel

After reading this blog post, you will learn how to:

– Select rows
– Insert, delete, hide, unhide, group, and ungroup rows
– Move rows
– Modify row height
– Refer to rows in formulas
– Count rows in a range
– Limit rows in a sheet

Note: We have used Excel for Microsoft 365 to prepare this tutorial.


What Is Excel Row?
Selecting Rows
How to Insert Rows
How to Delete Rows
Hide and Unhide Rows
How to Group Rows
How to Ungroup Rows
How to Move Rows
Modifying Row Height
Referring to a Row in Formula
Getting Number of Rows in a Range
Limiting the Number of Rows in Sheet


What Is Excel Row?

In Microsoft Excel, a row is a horizontal arrangement of cells that runs the worksheet from left to right. Each row is identified by the unique number on its left side from where it started.

Horizontal rows are numbered with numeric values such as 1, 2, 3, etc. usually displayed on the left side of the spreadsheet. A total 1,048,576 numbers of rows are stored in a spreadsheet.

The first row is commonly used for column headings or titles, and it is often referred to as the Header Row.

The final row in Excel is labeled as 1,048,576, and this number is unchangeable; additional rows cannot be added to a sheet. To incorporate more data, the solution is to insert a new worksheet, which will also consist of the same fixed number of rows.

To navigate the last row in Excel, click the Control + Down Arrow keys.


How to Select a Row in Excel?

In this part, we will discuss how to select rows in Excel using various methods with a keyboard shortcut.

1. Selecting Entire Row

To select an entire row in the worksheet, select a cell (in this case, B10) of the target row and then press the Shift + Spacebar shortcut.

Now, you can see that the 10th row has been selected in the following GIF.

Selecting whole row in Excel

Note
You can select a full row by using your mouse. Click the row number on the left side of your Excel window.

2. Selecting Adjacent Rows

To select adjacent rows in the worksheet, press the Shift + Spacebar keys ⇒ press the Down Arrow key holding the Shift + Spacebar keys.

Finally, you will see that rows have been highlighted from the 11th row to the 14th row.

Selecting adjacent rows

Note
You can also use the mouse shortcut here. Select row 11 and drag your mouse pointer down to row 11 to select multiple rows. As you drag the mouse, the selected rows will be highlighted.

3. Selecting Non-Adjacent Rows

You can simply select non-adjacent rows by holding the Ctrl key and clicking on the row numbers.

To select the 8th row, click the row number with your mouse.

Selecting non-adjacent rows

After that, hold down the Ctrl key ⇒ to select adjacent rows (in this case, the 10th and 12th rows) using your mouse.


4. Selecting Multiple Rows Using the Name Box

Apart from the common methods of selecting rows in Excel, there’s another useful trick using the Name Box.

  • Click on the Name box to enable it.
  • Write the reference for the row range you wish to choose. For example, use “8:12” in the Name box to select rows 8 through 12.
  • Press Enter.
  • You can see all the steps and the output in the following GIF.

Select Multiple Rows Using the Name Box


5. Selecting All Rows Below

In Excel, you can also use the Ctrl + Shift + Down Arrow shortcut to select all rows that are below a certain position.

Follow the detailed instructions below:

  • Choose the first cell in the row from where you want to start the selection.
  • To expand the selection to as many columns as required, hold down the Shift key and press the Right Arrow key.
  • Once you have selected all the required columns, release the Shift key.
  • It’s time to select every row below a specific position. Press the Ctrl+Shift+Down arrow keys simultaneously.

Select All Rows Below

Excel will choose all the rows automatically below, starting from the first point you choose and continuing to the very last row of data in your dataset.


6. Select Rows with a Certain Value in Column

You can use the Filter tool to select all rows that have a certain value in a particular column. To filter and choose the appropriate rows, follow the following actions:

Follow the Steps Below:

Select any cell in the dataset ⇒ Click on the Filter Tool in the Data tab.

Click on the Filter Tool in the Data tab

You can see the Filter drop-down in each column header.

Filter drop-down in each column header

Click the Filter arrow in the column that contains the specific value you wish to filter.

Click the Filter arrow

Then select the desired value or values from the drop-down menu. Excel will display only the rows that contain the selected value after filtering the data.

After applying the filter, you can select the filtered rows using the Mouse.

Select Rows with a Certain Value in Column


How to Insert Rows in Excel?

In this part, we will guide you on how to insert rows in Excel using the Insert Option, Keyboard shortcut, Name Box, and Copy and Paste method.

1. Insert Multiple Rows in Excel Using the Insert Option

In this part, we will show how to insert multiple rows from the Context Menu and Top Ribbon.

1.1 From Context Menu

To insert rows in a worksheet, select rows using the mouse and right-click on the selected rows.

Select rows using the mouse and right-click on the selected rows

Click on the Insert Option from the menu.

Click on the Insert Option from the menu

You can see that new rows have been added.

Insert Multiple Rows in Excel

Read More: How to Create Rows within a Cell in Excel


1.2 From Top Ribbon

To insert rows in a worksheet, select rows using the mouse ⇒ go to the Home tab ⇒ click the icon of the Insert command from the Cells group ⇒ click on the Insert Sheet Rows option.

Click on the Insert Sheet Rows option to insert rows

You can see that new rows have been added.

Insert multiple rows


2. Insert Multiple Rows Using a Keyboard Shortcut

To insert multiple rows, select any cell where you want to insert your new row.

  • Apply the shortcut method and press Shift + Spacebar to select the entire row
  • Press the Shift + Down arrow keys to select the number of rows you want to insert.
  • Press the Ctrl + Shift + Plus sign keys to insert your new rows.
  • In the following GIF, you can see rows have been inserted.

Insert Multiple Rows Using a Keyboard Shortcut

Note
Make sure you choose the same number of rows you wish to insert. For example, if you want to add two rows, you have to select two rows.

3. Insert Multiple Rows Using the Name Box

To insert multiple rows using the Name Box, select the cell above where you want to insert rows. For example, we will select the B9 cell.

  • Write the range 9:12 (according to your preference) and press Enter.

Select the range in the name box

  • All the rows have been selected from 9th to 12th.
  • Now, press the Ctrl + Shift + Plus (+) sign to insert rows into your worksheet.

Press the Ctrl + Shift + Plus (+) sign to insert rows

  • Finally, you can see all the rows have been inserted from 9th to 12th.

Insert Multiple Rows Using the Name Box

Read More: How to Insert Row in Excel


4. Insert Multiple Rows Using the Copy and Paste Method

To insert multiple rows with cell data, select the rows you want to insert.

Copy all the selected rows by pressing Ctrl + C.

Pressing Ctrl + C to copy the rows

Select the same number of rows using the mouse where you want to insert your new rows.

Select the same number of rows

Right-click on the selected rows, and then a menu will appear. Click on the Insert Copied Cells option to insert your copied rows in your spreadsheet.

Click on the Insert Copied Cells option

Finally, you can see all the copied rows (from the 10th to the 12th) have been inserted in the 13th, 14th, and 15th positions.

Insert Multiple Rows Using the Copy and Paste Method


Formatting Options Appearing After Inserting New Row in Excel

After inserting new rows, you will see a Format button appear. After clicking on that, you will get three options:

  1. Format Same as Above: Apply the same formatting (such as font style, cell borders, and background color) to the added row to match the format of the rows above.
  2. Format Same as Below: Apply formatting (such as font style, cell borders, and background color) to the inserted row to align with the format of the rows below.
  3. Clear Formatting: Removes all formatting.

Formatting Options Appearing After Inserting New Row in Excel


How to Delete Rows from Excel?

To delete an entire row, select row 8 Home tab ⇒ click on Delete Sheet Rows from the Delete drop-down menu.

Deleting rows from Excel

Read More: How to Delete Rows in Excel


How to Hide and Unhide a Row in Excel?

First, click on the row number ⇒ drag down the cursor to select the rows you want to hide.

To hide rows from 9-11, select rows 9,10,11⇒ Then go to the Home tab ⇒ click the icon of the Format command from the Cells group ⇒ click on the Hide & Unhide option ⇒ select the Hide Rows option.

You can see all the rows have been hidden.

Hide Rows in Excel

You can unhide all the rows using the same procedure, and then click on the Unhide Rows option.

Now, all the rows are visible again

Unhide rows in Excel

Read More: How to Hide Rows in Excel


How to Group Rows in Excel?

We can group rows in Excel in two easy ways: Manually and Automatically.

1. Group Rows Manually

To group rows manually, select data range B6:E16 ⇒ Go to the Data tab ⇒ click on Group from the Outline section.

Select Group option

A pop-up window named Groupe will appear before you. Select Rows from there.

Select Rows option

You can see that all the selected rows have been grouped.

Group Rows Manually

Note
You can also use the SHIFT + ALT + Right Arrow keyboard shortcut to create a group manually.

2. Group Rows Using Auto Outline Command

To group rows automatically, go to the Data tab ⇒ select Auto Outline from the Group drop-down.

Select Auto Outline from the Group drop-down

Finally, you can see the group has been created automatically.

Group Rows Automatically


How to Collapse and Expand Rows in Excel?

To collapse rows in an Excel worksheet, just click the – (Minus) button, as shown in the following image.

click on the - (Minus) icon

The collapsed row is now visible in the following image.

Collapse rows in Excel

To expand rows in your Excel worksheet, click on the + (Plus) icon as shown in the following image.

Click on the + (Plus) icon

You will now see the extended rows in the following image.

Expand rows in Excel

Read More: How to Expand and Collapse Rows in Excel


How to Ungroup Rows in Excel?

To ungroup rows, Select data range B6:E16 ⇒ Go to the Data tab ⇒ select the Ungroup option from the Outline section.

Select the Ungroup option

A pop-up window named Groupe will appear before you. Select Rows from there.

Select Rows option

Finally, you can see the group has been removed from rows.

Ungroup Rows in Excel


How to Move Rows in Excel?

The Excel Cut command is a valuable tool for relocating rows. The selected row can be inserted into either an empty row or another already occupied row, replacing the row.

To move a row,

  • Select the row (e.g. row 8) ⇒ select the Scissor-shaped icon (Cut Option) under the Home tab
  • Then, select the target row (e.g row 14 or any other row where you want to insert the cut row ⇒ select the Paste under the Home

Moving a Row in Excel

Now, you can see that row 8 has been moved to a new position ( row 14).

Read More: How to Move Rows in Excel


How to Modify Row Height in Excel?

In this section, we will show how to modify and autofit row height and set a custom height.

1. Modify Row Height by Dragging the Mouse

To modify row height, keep the cursor on row 5 ⇒ Adjust the row height by clicking and dragging the mouse upwards to increase it or downwards to decrease ⇒ Simply release the mouse button, and the selected row’s height will be changed.

Modify Row Height by Dragging the Mouse

Read More: Row Height Excel (All Things You Need to Know)


2. AutoFit Row Height

You can see that the rows are not adjusted here. So, we will adjust the row height with the text.

To do this, select the rows ⇒ Then go to the Home tab ⇒ click the icon of the Format command from the Cells group ⇒ click on the AutoFit Row Height option.

You can see the process and the output in the following GIF.

AutoFit Row Height


3. Set Custom Row Height

To set custom height according to your preference, Then go to the Home tab ⇒ click the icon of the Format command from the Cells group ⇒ click on the Row Height option.

Here, we will keep the row height at 20. You can see the changes in the following GIF.

Set Custom Row Height


How to Refer to Rows in Excel Formulas?

To refer to a row, you can use its number. Now, we will refer to row 9, then we will use the following address in the SUM function.

Refering to a Row in Excel

Now, you can see that it will refer to row 9 in the following image.


How to Get the Number of Rows in a Range of Cells?

We will use the ROW function to get the number of rows in a range. The ROWS function returns the number of rows in a reference or an array. It doesn’t require any arguments, and you simply provide a reference or array as its input.

Here’s the basic syntax:

=ROWS(reference)

Syntax of the ROWS Function in Excel

For example: we will select range B3:E13 from our dataset to count the number of rows.

  • Select cell G6.
  • Apply the following formula in cell G6.
=ROWS(B3:E13)

Now, you can get the number of rows in the following image.

Get Number of Rows Using ROWS Function in Excel


How to Limit the Number of Rows?

Sometimes, you may need to limit the number of rows to avoid showing all the Excel data to others. Follow the below steps accordingly.

  • To keep the last row visible, click the row number below it.
  • Press the Down Arrow key while holding down Ctrl + Shift This will select all the remaining rows from the selected row in the worksheet
  • Now, go to the Home tab ⇒ click on the arrow from the Format option under the Cells group ⇒select Hide & Unhide ⇒ click on Hide Rows from the drop-down menu.

Limiting the Number of Rows

This will hide every other row in your worksheet below the final row you have selected to remain visible.


Download Practice Workbook


In this article, we have discussed how to select, insert, group, modify, move, delete, hide, and unhide rows in the Excel workbook. You can learn how to count the number of rows in a range, and I have explained everything, from how to expand, collapse, and ungroup rows in Excel. We have also discussed the common scenario of navigating, limiting, and referring rows in Excel. Please share your thoughts with us in the comment box.


Rows in Excel: Knowledge Hub


<< Go Back to Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.

Tags:

Bishawajit Chakraborty
Bishawajit Chakraborty

Bishawajit Chakraborty, a Rajshahi University of Engineering & Technology graduate with a B.Sc. in Mechanical Engineering, has been associated with ExcelDemy since 2022. Presently, he is a content developer, specializing in Excel Power Query, Data Analysis and VBA. It is worth mentioning that he has authored more than 90 articles on VBA content development. His profound interest lies in the fields of data analytics and data science. He possesses expertise in VBA, Power BI, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo