+ Reply to Thread
Results 1 to 6 of 6

Compare two columns and write which is existing in B in C Column

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Compare two columns and write which is existing in B in C Column

    Hi Guru's

    Column A Column B Column C
    1955 1123
    1124 1127
    1579 1128
    1127 1129
    1128 1130
    1129 1131
    1130 1132
    1131 1133
    1132 1123 1123
    1133 1124 1124
    1135

    Above are the 3 columns, I would like have in common ones in C column. example I used 1123 and 1124. Hence What formula do I have to use it.

    Regards
    Uday

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Compare two columns and write which is existing in B in C Column

    =if(isna(vlookup(b1,a$1:a$11,1,0)),"",vlookup(b1,a$1:a$11,1,0))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Compare two columns and write which is existing in B in C Column

    Hi

    I am sorry, I want to put it different way.

    1955 1123 1123
    1124 1127
    1579 1128
    1127 1129
    1128 1130
    1129 1131
    1130 1132
    1131 1133
    1132 1123
    1133 1124 1124
    1135 1100
    1123 1101
    1124 1102

    I would like to compare with column B with Column A. If column B value exists in Column A then write it on Column C

    Regards
    Uday

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: Compare two columns and write which is existing in B in C Column

    Pls attach sample file
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Compare two columns and write which is existing in B in C Column

    Hi Siva,

    I have attached the file.

    Regards
    Uday
    Attached Files Attached Files

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: Compare two columns and write which is existing in B in C Column

    c2=IF(ISNUMBER(MATCH(B2,A$2:A$904,0)),B2,"")
    Try this and copy towards down

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error in a existing Macro used for compare the Comma Separated Values present in 2 columns
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2014, 05:44 AM
  2. Compare column in separate workbook but only write result if different
    By Alimac70 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2013, 08:25 AM
  3. Trying to write amacro to compare text in column A to garbage text in column B
    By Big Dawg Dad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2013, 03:31 PM
  4. [SOLVED] Move column to in-between existing columns
    By Melissa in forum Excel General
    Replies: 3
    Last Post: 08-31-2005, 09:05 AM
  5. How do I write a VBA code in excel that will compare two columns .
    By PenelopeinCinci in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2005, 01:06 PM

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