+ Reply to Thread
Results 1 to 7 of 7

match values in columns vba

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    29

    match values in columns vba

    Hey guys, I need your help for the following. I have two columns. In column A I have certain values that are the same as the values in column B. However, there are some values in column A that are different and nowhere to be found in column B. I need a macro that can match the same values from columns A and B and color them in say rgb(255,0,0). In this way I would know which values are the same in both columns. I want also to stress out that the values are interchanged. In a sense that if both values are the same in the colums it wont be like A1 - B1, A3 - B3, A5 - B5. It might be A1 - B11, A150 - B13

    Here's a sample:

    Column A Column B
    67441059 67441310
    67441060 67441211
    67441211 67441362
    67441310 67441793
    67441361 67441601
    67441362 67441672
    67441447 67441701
    67441601 67441742
    67441672 67441790
    67441701 67441701
    67441742 67441790
    67441790 67441870
    Thank you.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: match values in columns vba

    If all the matches are highlighted in the same color, how would you know which match is where?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-26-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: match values in columns vba

    I need to know whether the values from column A are to be found in column B. That's what I need. Below I highlighted in bold some of cells just as an example.

    67441059 67441310
    67441060 67441211
    67441211 67441362
    67441310 67441793
    67441361 67441601
    67441362 67441672
    67441447 67441701
    67441601 67441742
    67441672 67441790
    67441701 67441701
    67441742 67441790
    67441790 67441870

    The best case scenario would be to cut those values in sheet2 with the corresponding values next to each other.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: match values in columns vba

    Does this help?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-26-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: match values in columns vba

    Yep, its working. Thank you very much. I forgot about the vlookup. Need to practice more. Thanks again

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: match values in columns vba

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: match values in columns vba

    You're welcome. Glad to help out, and thanks for the feedback.

+ 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