+ Reply to Thread
Results 1 to 4 of 4

VBA code to delete rows if a specific value is not present

  1. #1
    Registered User
    Join Date
    08-06-2014
    Location
    Baltimore, MD
    MS-Off Ver
    2010
    Posts
    2

    VBA code to delete rows if a specific value is not present

    Hello,

    I'm trying to write a macro to update a report including deleting all rows that do not contain a specific value of TP in column K. I've searched the web and found various suggestions none of which are working for me. Below is one of the examples. Any ideas?


    Please Login or Register  to view this content.
    Moderator Note: Please read the forum rules and add code tags whenever you post code. Because you are new to the forum, I have added them for you today.
    Last edited by alansidman; 08-06-2014 at 04:13 PM. Reason: code tags added

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to delete rows if a specific value is not present

    A simple filter will do the job-No need for VBA. If you want a code, just record your actions using record macro.

  3. #3
    Registered User
    Join Date
    08-06-2014
    Location
    Baltimore, MD
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA code to delete rows if a specific value is not present

    Hi AB33, actually VBA is needed because I'm writing a macro which another person will use on a report they will pull on a weekly basis.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to delete rows if a specific value is not present

    Please attach a sample and will show you the VBA code and a record macro are almost the same.

+ 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. Delete Rows based on values present in another column
    By mlogan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 03:13 AM
  2. [SOLVED] Transpose Rows to Columns VBA Code and delete specific account numbers
    By cowboys in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2012, 06:10 PM
  3. [SOLVED] Looking for VBA code to delete rows if values in 3 specific columns are the same
    By Priceman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2012, 10:32 AM
  4. Replies: 2
    Last Post: 09-20-2012, 11:54 AM
  5. Delete Rows based on values present in another column
    By booo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2011, 05:19 PM

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