+ Reply to Thread
Results 1 to 2 of 2

Macro to Clear row contents

Hybrid View

  1. #1
    Registered User
    Join Date
    03-20-2008
    Posts
    11

    Macro to Clear row contents

    The below macro works exactly how I want it to and clears the contents of the entire row when and N/a is found, however I now want to add functionality to this.

    In column G I have a listof part numbers, i want the macro to also clear the entire row contents if the part number in column g is smaller than 2000 (dummy part numbers)

    Any assitance would be appriciated.

    Sub Kill_NA()
    On Error GoTo ErrorSkip:
    Dim Response As Integer
    Response = MsgBox(prompt:="This Step is Optional and may take several minutes are you sure? ", Buttons:=vbYesNo)
    If Response = vbYes Then
    Range("J3:J1500").SpecialCells(xlCellTypeFormulas, 16).EntireRow.ClearContents
    ErrorSkip: Response = MsgBox(prompt:="All N/A's Removed", Buttons:=vbOKOnly)
    End If
    End Sub

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro to Clear row contents

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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