+ Reply to Thread
Results 1 to 2 of 2

Delete Specific Rows That contain certain data in two columns

  1. #1
    Registered User
    Join Date
    07-28-2014
    Location
    United STates
    MS-Off Ver
    2010
    Posts
    1

    Delete Specific Rows That contain certain data in two columns

    I want to create a loop to check all of the rows in a sheet that I have and want this code to be able to delete rows if they contain a specified content in two certain columns (i.e. if column K matches the value in AJ1 and column J matches the value in AK1, then delete the entire row). Is there a way to code this?


    This is what I tried, but I couldn't get it to work for both columns.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Delete Specific Rows That contain certain data in two columns

    Hi Josephir1,

    Perhaps try this code instead:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Delete Rows If All Specific Columns Are Blank
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-03-2014, 04:50 AM
  2. Delete any blank rows from specific columns
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2013, 03:45 PM
  3. Delete 1 to 8 rows. Do text to columns to specific columns.
    By niceblue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2013, 10:53 AM
  4. [SOLVED] delete all rows but 1 in specific columns
    By matt3m in forum Excel General
    Replies: 1
    Last Post: 04-22-2012, 11:00 PM
  5. Delete Specific Rows/Columns
    By lazenca in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2008, 01:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1