+ Reply to Thread
Results 1 to 3 of 3

Compare columns

  1. #1
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Compare columns

    Hi,

    I would like to know how to compare 2 columns and return a value from a 3rd column.

    Scenario -
    Column D contains random telephone numbers but missing the first digit
    Column A contains more random telephone numbers but complete
    Column B contains a numeric value
    I want to compare Column D against Column A and if the value from column D is contained within any of the numbers in Column A then enter the value from Column B into Column E

    For example
    Column D - 1412323564
    Column A - Could contain 01412323564 or 1412323564
    Column B - 10101012
    Value entered into column E is 10101012 if Column D is found in Colun A

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

    Re: Compare columns

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Samba

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

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

    Re: Compare columns

    may the below

    e1=IFERROR(VLOOKUP(D1,A:B,2,0),VLOOKUP("?"&D1,A:B,2,0))
    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. Replies: 2
    Last Post: 11-27-2016, 05:56 PM
  2. Replies: 6
    Last Post: 09-21-2016, 04:21 PM
  3. Formula to Compare 2 Different Columns on a single Row Multiple Columns
    By dndgeez in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2015, 04:11 AM
  4. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  5. Replies: 2
    Last Post: 02-05-2014, 07:30 PM
  6. [SOLVED] Macro to Compare Columns A & B and dispaly any duplicates in Columns C & D
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2013, 02:24 AM
  7. Replies: 6
    Last Post: 05-30-2013, 04:58 PM

Tags for this Thread

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