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 6706789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:33:43+00:00 2026-05-26T07:33:43+00:00

I have the following in Excel spreadsheet, How do I delete a row based

  • 0

I have the following in Excel spreadsheet,

a cut down version of my spreadsheet

How do I delete a row based on the published within the J column = 0?

It would be better to cut the row and paste it within another sheet.. but IF you can help me with just deleting it, that would be good.

  • 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-05-26T07:33:43+00:00Added an answer on May 26, 2026 at 7:33 am

    This code autofilters the rows on the activesheet where J =0, copies them to the first blank row on the second worksheet, then deletes the rows from the activesheet.

    Change this line Set ws2 = Sheets(2) to copy the rows to a different sheet, ie Set ws2 = Sheets("Your Sheet Name") or Set ws2 = Sheets(5) for the fifth sheet etc

    Sub MoveEm()
        Dim ws1 As Worksheet
        Dim ws2 As Worksheet
        Set ws1 = ActiveSheet
        Set ws2 = Sheets(2)
        Dim rng1 As Range
        Application.ScreenUpdating = False
        With ws1
            .AutoFilterMode = False
            .Columns("j").AutoFilter Field:=1, Criteria1:="0"
            With .AutoFilter.Range.Offset(1, 0).EntireRow
            Set rng1 = ws2.Cells.Find("*", ws2.[a1], xlValues, , xlRows, xlPrevious)
            If rng1 Is Nothing Then
            Set rng1 = ws2.[a1]
            Else
            Set rng1 = ws2.Cells(rng1.Row + 1, "A")
            End If
                .Copy rng1
                .Delete
            End With
            .AutoFilterMode = False
        End With
        Application.ScreenUpdating = True
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel spreadsheet in a format similar to the following... | NAME
i have an excel spreadsheet of about 3 million cells. i asked the following
I have an excel spreadsheet that has dates in the first column, the rest
I have data in an Excel spreadsheet that has 10,000 rows with the following
Suppose i have the following raw data in excel spreadsheet: [Name ] [ID ]
I have the following data in an Excel Spreadsheet: A B C 1 b
I'm needing to import an Excel spreadsheet into my program and have the following
I have one Excel spreadsheet which has the following columns: Surname / First Name
I have an excel spreadsheet with the following data ----- A-----------------B 1 ----X 2
I have the following in a program (written in VB.NET): Imports Microsoft.Office.Interop.Excel Public Class

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.