+ Reply to Thread
Results 1 to 5 of 5

How to match the strings in two different columns using VBA Macros

  1. #1
    Registered User
    Join Date
    11-13-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    How to match the strings in two different columns using VBA Macros

    Require a help. I have 2 columns say column A and column B.Column A has 48 country names and column B has 200 country names. Now I want to write a macro in a way for all the countries which are in column A and are present in column B, value 2 should be displayed in the adjacent cell of column C.Kindly help
    Last edited by naga divya; 11-13-2014 at 08:04 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    346

    Re: Hi All,

    Hi you, better change the thread title related to your question.
    the mods will be onto you soon

  3. #3
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    346

    Re: How to match the strings in two different columns using VBA Macros

    you don't need a macro actually,

    put this in C1 and copy down
    =IF(ISERROR(MATCH(A1,B:B,0)),"",2)

  4. #4
    Registered User
    Join Date
    11-13-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: How to match the strings in two different columns using VBA Macros

    yes.but i wanted to know how i can put this in macro as it is repetitive task for me.

  5. #5
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    346

    Re: How to match the strings in two different columns using VBA Macros

    here you go

    Please Login or Register  to view this content.

+ 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