Results 1 to 10 of 10

Thread: VBA - Delete Entire Row if Cell contains Text variable

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Regular
    Joined
    Mar 2015
    Posts
    31
    Location
    try
    Sub sbDelete_Rows_IF_Cell_Cntains_String_Text_Value()
    
    Dim LRow As Long
    Dim X As Long
    
    LRow = 10
    
    For X = LRow To 1 Step -1
       If Cells(X, "A") = "France" Or Cells(X, "A") = "Italie" Or Cells(X, "A") = "UK" Then    ' You can change this text
          Cells(X, "A").Resize(, 2).ClearContents
       End If
    Next
    
    End Sub
    Last edited by mokhtar; 09-17-2015 at 01:11 PM.

Posting Permissions

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