Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8915327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:57:05+00:00 2026-06-15T04:57:05+00:00

In my active sheet called Report I have 2 column I & F. It

  • 0

In my active sheet called Report I have 2 column I & F.

It has repeating cells containing text “Grand Total”.

I would like to delete whole row if it contains Grand Total automatically.

VBA code would be nice.

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:57:07+00:00Added an answer on June 15, 2026 at 4:57 am

    With the following VBA code, you can quickly delete the rows with certain cell value, please do as the following steps:

    1. Select the range that you want to delete the specific row.

    2. Click Developer>Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:

      VBA code to Remove entire rows based on cell value(i.e. Grand Total):

      Sub Delete_Rows()
          Dim rng As Range, cell As Range, del As Range
          Set rng = Intersect(Range("A1:D22"), ActiveSheet.UsedRange)
          For Each cell In rng
          If (cell.Value) = "Grand Total" _
          Then
          If del Is Nothing Then
          Set del = cell
          Else: Set del = Union(del, cell)
          End If
          End If
          Next cell
          On Error Resume Next
          del.EntireRow.Delete
          End Sub
      
    3. Then click “Play/Run” button to run the code, and the rows which have certain value have been removed.

    (Note: If you can’t see Developer Tab in Excel Do these Steps: 1)Click the Office Button, and then click Excel Options. 2)In the Popular category, under Top options for working with Excel, select the Show Developer tab in the Ribbon check box, and then click OK.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Access databases, and in one table I have field called Active.
The title says it: I have an excel Sheet with an column full of
I have a standard code that prints all charts in your active sheet to
I have a excel table with 1 sheet. That sheet has headers in row
I have a sheet called "main" that takes values from another file's sheet called
In Active Directory, there is a tab called Dial-In, and under that tab is
The active directory I have to deal with is laid out as such: the
I have been doing active development in C# for several years now. I primarily
I have 2 sheets, in one Sheet there are 2 buttons Browsefile and Openfile
I have two tables that look like this: Products: id category name description active

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.