• 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
52
309 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
  • Kaspersky Internet Security 2021 1 year 5 devices key Global Kaspersky Internet Security 2021 1 year 5 devices key Global
    Rated 5.00 out of 5
    $45.00
  • Windows Server 2022 Datacenter Key Global Windows Server 2022 Datacenter Key Global
    Rated 5.00 out of 5
    $7.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
  • Avast Ultimate Suite 2021 1 Year 10 Devices Global Avast Ultimate Suite 2021 1 Year 10 Devices Global
    Rated 5.00 out of 5
    $54.00
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
Products
  • Microsoft Project 2019 Professional Key Global Microsoft Project 2019 Professional - 5 PC
    Rated 4.97 out of 5
    $12.00
  • Windows Server 2012 R2 Standard Key Global Windows Server 2012 R2 Standard Key Global
    Rated 4.78 out of 5
    $15.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
  • Windows Server 2016 Standard Key Global Windows Server 2016 Standard Key Global
    Rated 4.80 out of 5
    $10.00
  • Kaspersky Internet Security 2021 1 year 5 devices key Global Kaspersky Internet Security 2021 1 year 5 devices key Global
    Rated 5.00 out of 5
    $45.00
  • Microsoft Project Standard 2019 - 1 PC Microsoft Project Standard 2019 - 1 PC $12.00
  • Office 2016 Home and Student for PC Key CD Key Global Office 2016 Home and Student for PC Key CD Key Global
    Rated 4.96 out of 5
    $14.00
  • Microsoft Visual Studio Enterprise 2022 For 1 PC Microsoft Visual Studio Enterprise 2022 For 1 PC $19.00
  • Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global
    Rated 5.00 out of 5
    $22.00
  • Windows Server 2016 Remote Desktop Services 50 USER Connections Key Global Windows Server 2016 Remote Desktop Services 50 USER Connections Key Global
    Rated 4.74 out of 5
    $15.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.