• ChatGPT Business
  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
    • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips

No products in the cart.

  • ChatGPT Business
  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
    • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips

No products in the cart.

  • ChatGPT Business
  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
    • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips

No products in the cart.

  • ChatGPT Business
  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
    • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
Excel

Guide on 2 ways to delete conditional rows in Excel

0 Comments

Guide on 2 ways to delete conditional rows in Excel: If you want to delete one or more rows (based on certain conditions) in Excel, you may have to spend a lot of time selecting and deleting in the data table. This method is also prone to errors, especially for spreadsheets with large amounts of data. Buffcom.net article will guide you on 2 simple and quick ways to delete conditional rows in Excel. We invite you to read the article.

Method 1: Using Find and Replace

In addition to the search and replace function, Find and Replace feature can also be used to delete conditional rows in Excel. Here are the steps:

Step 1: Select the data range that contains the rows you want to delete.

Step 2: Press the Ctrl + F key combination to open the Find and Replace dialog box.

Step 3: In the Find and Replace dialog box, enter the value of the conditional cell that you want to delete in the Find what box, then select Find All. In this example, we will delete cells that have the value “sữa béo”.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 4: Press the Ctrl + A key combination to select all search results at the bottom of the Find and Replace dialog box. Then close the dialog box.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 5: Right-click on one of the selected cells, then select Delete, and then select Table Rows.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Thus, with just a few simple steps, rows that contain the value “sữa béo” have been deleted from the data table.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Method 2: Using VBA code

In addition to the Find and Replace function, you can also delete conditional rows using VBA code. Here are the steps:

Step 1: Press the Alt + F11 key combination to open the Microsoft Visual Basic for Applications window.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 2: Select Insert, and then select Module to enter the VBA code.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 3: Enter the following code into the module, and then select Run to execute the code.

Sub DeleteRows()
'Updateby20140314
Dim rng As Range
Dim InputRng As Range
Dim DeleteRng As Range
Dim DeleteStr As String
xTitleId = "Xoa dong"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
DeleteStr = Application.InputBox("Delete Text", xTitleId, Type:=2)
For Each rng In InputRng
If rng.Value = DeleteStr Then
If DeleteRng Is Nothing Then
Set DeleteRng = rng
Else
Set DeleteRng = Application.Union(DeleteRng, rng)
End If
End If
Next
DeleteRng.EntireRow.Delete
End Sub

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 4: When the dialog box appears, select the data range that contains the row you want to delete and input it into the text box. Then press OK.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

Step 5: When the next dialog box appears, enter the condition value of the row you want to delete into the text box. Then press OK to complete.

Guide on 2 ways to delete conditional rows in Excel

Guide on 2 ways to delete conditional rows in Excel

By following these steps, you have completed deleting the rows that meet the condition in Excel using VBA code.

These are 2 simple ways to quickly and accurately delete rows that meet certain conditions in Excel. We hope this helps and wish you all the best in your work.

Rate this post
57
338 Views
2 quickest ways to change Word Docx file extension to DocPrev2 quickest ways to change Word Docx file extension to DocFebruary 22, 2023
How to add a row in Excel easily that you might not know?February 22, 2023How to add a row in Excel easily that you might not know?Next

Leave a Reply Cancel reply

You must be logged in to post a comment.

Buy Windows 11 Professional MS Products CD Key
Buy Office 2021 Professional Plus Key Global For 5 PC
Top rated products
  • Avast Premium Security 2021 Avast Premium Security 2021 1 Device 1 Year Global
    Rated 5.00 out of 5
    $11.00
  • Trend Micro Internet Security 3 Devices 1 Year Key GLOBAL Trend Micro Internet Security 3 Devices 1 Year Key GLOBAL
    Rated 5.00 out of 5
    $17.00
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
  • AVG Internet Security 2021 10 Devices 2 Years Global AVG Internet Security 2021 10 Devices 2 Years Global
    Rated 5.00 out of 5
    $42.20
  • Trend Micro Maximum Security 3 Devices 1 Year key Global Trend Micro Maximum Security 3 Devices 1 Year key Global
    Rated 5.00 out of 5
    $15.00
Products
  • Microsoft SQL Server 2019 Enterprise Microsoft SQL Server 2019 Enterprise $39.00
  • Project Professional 2010 Microsoft Project Professional 2010 - 1PC $9.00
  • Windows Server 2012 R2 Standard Key Global Windows Server 2012 R2 Standard Key Global
    Rated 4.78 out of 5
    $15.00
  • Office 2024 Home And Business For Mac/Pc Bind Office 2024 Home And Business For Mac/Pc Bind $110.00
  • Kaspersky Small Office Security 10 PCs + 10 Mobiles + 1 Server 1 Year Kaspersky Small Office Security 10 PCs + 10 Mobiles + 1 Server 1 Year
    Rated 5.00 out of 5
    $164.50
  • AVG Internet Security 2021 10 Devices 2 Years Global AVG Internet Security 2021 10 Devices 2 Years Global
    Rated 5.00 out of 5
    $42.20
  • Windows Server 2019 Remote Desktop Services Device Connections (50) Cal Key Global Windows Server 2019 Remote Desktop Services Device Connections (50) Cal Key Global
    Rated 4.72 out of 5
    $20.00
  • Avast Ultimate Suite 2021 2 Years 10 Devices Global Avast Ultimate Suite 2021 2 Years 10 Devices Global
    Rated 5.00 out of 5
    $77.00
  • Project Standard 2021 Microsoft Project Standard 2021 - 1 PC $13.00
  • Microsoft Visio Professional 2013 Key 1PC Microsoft Visio Professional 2013 Key 1PC $9.00
Product categories
  • Anti Virus
  • Microsoft Office
  • Microsoft Project
  • Microsoft Visio
  • Microsoft Visual
  • Microsoft Windows
  • Other Software
  • Uncategorized

Buffcom.net always brings the best digital products and services to you. Specializing in Office Software and online marketing services

BIG SALE 50% IN MAY

Microsoft Office
Microsoft Windows
Anti-Virus
Contact Us

Visit Us:

125 Division St, New York, NY 10002, USA

Mail Us:

buffcom.net@gmail.com

TERMS & CONDITIONS | PAYMENT GUIDE  | SHIPPING POLICY  | REFUND POLICY

Copyright © 2019 buffcom.net  All Rights Reserved.