• Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us
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
44
302 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
  • Windows 11 Pro Product Activation Key Windows 11 Pro Product Activation Key
    Rated 5.00 out of 5
    $6.00
  • AVG Internet Security 2021 10 Devices 1 Year Global AVG Internet Security 2021 10 Devices 1 Year Global
    Rated 5.00 out of 5
    $30.00
  • Kaspersky Total Security 2021 1 year 1 device key Global Kaspersky Total Security 2021 1 year 1 device key Global
    Rated 5.00 out of 5
    $27.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
  • Buy Windows 11 Pro CD Key License Buy Windows 11 Pro CD Key License
    Rated 5.00 out of 5
    $6.00
Products
  • Windows Server 2025 Remote Desktop Services 50 User Connections Windows Server 2025 Remote Desktop Services 50 User Connections $25.00
  • Avast Ultimate Suite 2021 3 Years 10 Devices Global Avast Ultimate Suite 2021 3 Years 10 Devices Global
    Rated 5.00 out of 5
    $90.00
  • Buy Windows 11 Home CD Key Global Buy Windows 11 Home CD Key Global
    Rated 4.73 out of 5
    $6.00
  • Microsoft Visio Professional 2016 Key 1PC Microsoft Visio Professional 2016 Key 1PC $9.00
  • Microsoft Visio Standard 2019 Key 1PC Microsoft Visio Standard 2019 Key 1PC $12.00
  • Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account
    Rated 4.95 out of 5
    $58.00
  • Microsoft Visio 2019 professional Key Global Bind to your Microsoft Account Microsoft Visio 2019 professional Key Global Bind to your Microsoft Account
    Rated 4.96 out of 5
    $12.00
  • Windows 10 Home OEM Key Global Windows 10 Home OEM Key Global
    Rated 4.80 out of 5
    $6.00
  • Windows Server 2019 Datacenter Key Global Windows Server 2019 Datacenter Key Global
    Rated 4.75 out of 5
    $7.00
  • Kaspersky Plus - 1 Device 1 Year - GLOBAL Kaspersky Plus - 1 Device 1 Year - GLOBAL $23.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.