+ Reply to Thread
Results 1 to 6 of 6

Compare two columns and return a value

  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Kerala, India
    MS-Off Ver
    Excel 2013
    Posts
    93

    Thumbs up Compare two columns and return a value

    I use Windows 7 Pro Service Pack 1
    MS Office 2013

    I have 4 columns in a sheet A,B,C,D
    I wish to check each Cell values in Column A and compare it with Column C
    When Cell Value in Column A matches value in Column C,
    Column C's corresponding value in column D should be copied to column B (adjacent to value in Column A)

    Result should look like:
    Please have a look at the Sheet1 in the attachment (I have copied values from Column D manually to 'B')

    Formula is required for:Column B

    B= Column's C's corresponding D value (where values in column A and C matches)
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-12-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2013
    Posts
    38

    Re: Compare two columns and return a value

    in b2 put
    =if(a2=c2,d2,"")
    copy the formula through colum b

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

    Re: Compare two columns and return a value

    You have duplicate values in C7 & C13, in this case which value to display in B12
    Samba

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

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Compare two columns and return a value

    btw. update your profile about excel version

    version.jpg

    anyway maybe try: =IFNA(INDEX($D$1:$D$13,MATCH(A1,$C$1:$C$13,0)),"")
    or PowerQuery with, imho, better result (result table can be placed anywhere)
    Attached Files Attached Files
    Last edited by sandy666; 05-15-2018 at 06:38 AM.

  5. #5
    Registered User
    Join Date
    07-20-2011
    Location
    Kerala, India
    MS-Off Ver
    Excel 2013
    Posts
    93

    Re: Compare two columns and return a value

    Perfect formula!

    Thanks a lot

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Compare two columns and return a value

    You are welcome
    Have a nice day

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Compare columns and return value
    By smudgers9 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2018, 06:31 AM
  2. Compare two columns and return value from third
    By Frekazoid in forum Excel General
    Replies: 1
    Last Post: 04-25-2018, 10:02 AM
  3. Compare two columns and return a third value
    By khedger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-08-2015, 12:46 PM
  4. [SOLVED] Evaluate to columns; compare two columns and return result
    By kjxavier in forum Excel General
    Replies: 2
    Last Post: 09-25-2014, 04:08 AM
  5. [SOLVED] Compare two columns and return a third
    By utahguy9384 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2014, 06:31 PM
  6. Compare two columns, return with yes or no?
    By dawsonsoo in forum Excel General
    Replies: 2
    Last Post: 05-05-2014, 02:10 PM
  7. [SOLVED] Compare 2 columns with another 2 columns as return value from 3rd column
    By DHFE in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 07:54 AM

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