Results 1 to 10 of 17

Thread: Exclude Contents From List :

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    or:
    Code:
    Sub M_snb()
        sn = Range("B1:B3")
        sp = Filter(Filter(Filter(Application.Transpose(Range("A1:A1000")), sn(1, 1), False), sn(2, 1), False), sn(3, 1), False)
        Cells(1, 8).Resize(UBound(sp) + 1) = Application.Transpose(sp)
    End Sub
    or:
    Code:
    Sub M_snb_002()
        sn = Range("B1:B3")
        sp = Columns(1).SpecialCells(2)
        
        For j = 1 To UBound(sp)
            If (sp(j, 1) = sn(1, 1)) + (sp(j, 1) = sn(2, 1)) + (sp(j, 1) = sn(3, 1)) = 0 Then c00 = c00 & "_" & j
        Next
    
        sp = Application.Index(sp, Split(Mid(c00, 2), "_"), 1)
        Cells(1, 10).Resize(UBound(sp)) = Application.Transpose(sp)
    End Sub
    Does this amendment make any difference ?

    Code:
    Sub M_snb()
      sn = Range("B1:B3")
    
      For Each it In sn
        Columns(1).specialcells(2).Replace it, "", 1
      Next
    
      columns(1).specialcells(4).entirerow.delete
    End Sub
    Last edited by snb; 06-07-2013 at 12:26 PM.

Similar Threads

  1. Replies: 5
    Last Post: 01-12-2013, 02:49 AM
  2. Delete List Contain Matching from Second List
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 12
    Last Post: 10-07-2012, 07:18 PM
  3. Macro for Opening files and copy the contents of the File
    By ravichandavar in forum Excel Help
    Replies: 16
    Last Post: 08-15-2012, 09:17 PM
  4. Macro to create files as per the contents in a column
    By Praveen Bj in forum Excel Help
    Replies: 1
    Last Post: 07-05-2012, 09:07 PM
  5. Replies: 4
    Last Post: 05-14-2012, 11:58 AM

Posting Permissions

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