Results 1 to 4 of 4

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

Threaded View

  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?


    'If Application.CountIf(Range("K:K"), 0) <> "TP" Then
    'Rows(3).Resize(3).Delete
    'End If
    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

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