Results 1 to 11 of 11

Removing Items from a Column A based on Same Values in Column B, while simutanously..

Threaded View

AriX3 Removing Items from a Column... 10-20-2011, 01:27 PM
tlafferty Re: Help with this macro 10-20-2011, 01:33 PM
AriX3 Re: Help with this macro 10-20-2011, 01:41 PM
tlafferty Re: Help with this macro 10-20-2011, 01:53 PM
AriX3 Re: Help with this macro 10-20-2011, 02:04 PM
AriX3 Re: Help with this macro 10-20-2011, 02:08 PM
AriX3 Re: Help with this macro 10-20-2011, 02:14 PM
AriX3 Re: Removing Items from a... 10-20-2011, 03:01 PM
tlafferty Re: Removing Items from a... 10-20-2011, 03:45 PM
AriX3 Re: Removing Items from a... 10-21-2011, 09:04 AM
AriX3 Re: Removing Items from a... 10-21-2011, 09:25 AM
  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    Mississauga
    MS-Off Ver
    Excel 2003
    Posts
    9

    Removing Items from a Column A based on Same Values in Column B, while simutanously..

    Hi, So I have 3 Columns in an Excel Spread Sheet
    Column A contains a list of values
    Column B contains a list of values that may or may not be present in Column A
    Column C has equal number of values as column A and the values correspond to each other

    Now I need to remove ALL values from Column A that are in Column B

    Ex.
    Column A has
    A
    B
    C
    D
    E
    F
    G

    Column B has
    B
    C

    Column C has
    1
    2
    3
    4
    5
    6
    7


    the resultant is Column A
    A
    D
    E
    F
    G

    Column B
    B
    C

    Column C
    1
    2
    3
    4
    5
    6
    7


    this is done through this macro:

    Sub TryMe()
        Dim rRangeA As Range
        Dim rRangeB As Range
        Dim rCell As Range
         
        Set rRangeA = Range("A1", Range("A65536").End(xlUp))
        Set rRangeB = Range("B1", Range("B65536").End(xlUp))
         
        For Each rCell In rRangeA
            If WorksheetFunction.CountIf(rRangeB, rCell) > 0 Then
                rCell.Delete
            End If
        Next rCell
         
    End Sub
    Now what i want to do is have this macro simutanously delete values from Column C as well

    This means Column C should be
    1
    4
    5
    6
    7



    Any help is appreciated, im new to this, using Excel 2003.
    Last edited by AriX3; 10-21-2011 at 09:25 AM.

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