Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to only delete visible rows or columns in Excel?

In Excel, we usually hide some important rows or columns of information, sometimes, we need to delete the visible rows or columns only, if you delete them with Delete key directly, the hide values will be deleted at the same time. How do you delete the visible rows or columns without deleting the hidden rows or columns in Excel? This tutorial will introduce the ways to delete visible rows only.

Delete visible values only with Go To Special command

Delete visible values only with VBA code

Delete visible rows only with Kutools for Excel

arrow blue right bubble Delete visible values only with Go To Special command

With this Go To Special command in Excel, you can quickly select the visible values and then delete them with Delete key. Do as this:

1. Select the range that you want to delete the visible data.

2. Click Home > Find & Select > Go To Special, see screenshot:

3. In the Go To Special dialog box, select Visible cells only, see screenshot:

4. Then click OK, all the visible rows have been selected in the selected range.

5. Then press Delete key on the keyboard, the selected visible values will be deleted and the hidden values will be kept. See screenshots:



1.In this way, you can also remove the visible column values, see screenshots:

arrow blue right bubble Delete visible values only with VBA code

The following VBA code also can help you to remove the visible cell values only in Excel.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

3. Then press F5 key or to run the code, and the visible cell values have been removed with the hidden values remaining.

4. Then a dialog will be displayed for you to select a range to deletd the visible cells only .

Sub DeleteVisibleRows()
'Update 20130906
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Application.ScreenUpdating = False
Application.ScreenUpdating = True
End Sub


arrow blue right bubble Delete visible rows only with Kutools for Excel

The above two methods only can remove the visible values, but not the entire rows, if you have this Kutools for Excel, its Delete Rows & Columns function can help you quickly delete the visible entire rows or columns.

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now

After installing Kutools for Excel, please do as follows:

1. Select the range that you want to apply this tool.

2. Click Kutools > Delete Tools > Delete Rows & Columns, see screenshot:

3. In the Delete Rows & Columns dialog box, choose In Select Range from the Look in, then specify the Rows and Visible rows from the Delete type and Detailed type separately. Click OK, and the prompt box will remind you how many visible rows have been deleted. See screenshot:

4. Then click OK, all the visible rows in the selected range have been deleted and the hidden rows are kept. See screenshots:

Notes: 1. You can delete the visible rows or columns from the selected range, selected sheets, active sheet or all sheets under the Look in option.

2. With this function, you can also delete hidden rows or columns, blank rows or columns.

Please click Delete Rows & Columns to know about this feature.

Related articles:

How to remove blank or empty rows in Excel?

How to delete all hidden rows or columns in Excel?

Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    John · 2 years ago
    Didn't delete the rows, simply made them blank
  • To post as a guest, your comment is unpublished.
    Ashsh · 4 years ago
    thank you very much for the post :-)
  • To post as a guest, your comment is unpublished.
    Anupma · 5 years ago
    I have faced the same issue in 2007, I tried folowing way it worked:
    1. Keep the cursor on header cell eg, I wanted to filter by Product Name so I kept my cursor in Product Name Header.
    2. Click on Data>Filter
    3.Select Rows Number at Left most
    4. Right Click> Delete Rows

    Note: If only Delete option is displayed then it will delete hidden rows also, Try and follow steps again the option should be 'Delete Rows'
    Good Luck