+ Reply to Thread
Results 1 to 5 of 5

Macro to clear cells in range & move up if certain cells meet criteria

Hybrid View

  1. #1
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,024

    Re: Macro to clear cells in range & move up if certain cells meet criteria

    Reread your requirements.

    Try this:

    Option Explicit
    
    Sub GUS3R()
        Dim lr As Long
        Dim i As Long
        lr = Range("A" & Rows.Count).End(xlUp).Row
        Application.ScreenUpdating = False
        For i = lr To 2 Step -1
            If Range("G" & i) = "GUS" Or Range("G" & i) = "3R" Then
                If Range("I" & i) <> "Double Panel" Then
                    Range("A" & i & ":M" & i).Delete
                End If
            End If
        Next i
        Application.ScreenUpdating = True
        MsgBox "Task Completed"
    End Sub
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  2. #2
    Registered User
    Join Date
    03-01-2011
    Location
    Jersey
    MS-Off Ver
    Excel 2008
    Posts
    22

    Re: Macro to clear cells in range & move up if certain cells meet criteria

    You are the BEST! Thank you so much! Saved me a bundle of time!

+ 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] COUNTIF on range of cells that meet 2 criteria
    By mattsafact in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2016, 10:54 AM
  2. [SOLVED] Help with loop to select range of cells that meet criteria
    By NU2vba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2016, 02:27 AM
  3. [SOLVED] Deleting rows where range of cells meet two criteria
    By dubcap01 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-23-2015, 04:50 AM
  4. [SOLVED] Skip cells and move onto next cell that don't meet criteria using IF fucntion in Excel
    By sprewett in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-06-2014, 07:49 AM
  5. Paste range of cells that meet criteria
    By lorena.tgarza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2012, 09:51 PM
  6. move row data to a new tab when cells meet specific criteria
    By brian807 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-10-2012, 10:18 AM
  7. sum a range of cells that meet one criteria
    By shanevo6 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2007, 04:06 PM

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