Results 1 to 3 of 3

Thread: Logic

  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This works for me:

    If Range("B" & rg) <> "65-03" Then
    Range("B" & rg).EntireRow.Delete
    Else

    But I also need to eliminate non blank items in M, so why does this not work?

    If Range("B" & rg) <> "65-03" And Range("M" & rg) <> ""Then
    Range("B" & rg).EntireRow.Delete
    Else

    Am I missing something?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Change And to Or (and insert a space before Then):

    If Range("B" & rg) <> "65-03" Or Range("M" & rg) <> "" Then

  3. #3

Posting Permissions

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