+ Reply to Thread
Results 1 to 8 of 8

A problem with an IF formula - matching values

Hybrid View

Arty_1 A problem with an IF formula... 10-23-2014, 03:22 PM
alansidman Re: A problem with an IF... 10-23-2014, 03:29 PM
Arty_1 Re: A problem with an IF... 10-23-2014, 03:36 PM
ChemistB Re: A problem with an IF... 10-23-2014, 03:56 PM
Arty_1 Re: A problem with an IF... 10-23-2014, 04:20 PM
alansidman Re: A problem with an IF... 10-23-2014, 04:31 PM
ChemistB Re: A problem with an IF... 10-23-2014, 04:31 PM
Arty_1 Re: A problem with an IF... 10-23-2014, 04:59 PM
  1. #1
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    A problem with an IF formula - matching values

    Hello!

    I've faced an issue concerning an IF formula.

    I need the values of column A to match the values of column B.

    See the file attached.
    Attached Files Attached Files
    Last edited by Arty_1; 10-23-2014 at 04:15 PM.
    Regards

    Arty

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,785

    Re: A problem with an IF formula - matching values

    In D2 type =IF(ISERROR(VLOOKUP(B2,$A$2:$A$435,1,FALSE)),"NA",VLOOKUP(B2,$A$2:$A$435,1,FALSE)) and copy it down the sheet.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A problem with an IF formula - matching values

    Thanks but it shows "NA" all the way down

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: A problem with an IF formula - matching values

    I get some matches further down the page with Alan's formula. However, what exactly are you asking for with "I need the values of column A to match the values of column B."?
    If you use Alan's formula, if the code in B appears anywhere in A, it will appear in D
    If you reverse Alan's formula
    =IF(ISERROR(VLOOKUP(A2,$B$2:$B$11143,1,FALSE)),"NA",VLOOKUP(A2,$B$2:$B$11143,1,FALSE))
    if the code in A appears anywhere in B, it will appear in D.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A problem with an IF formula - matching values

    The main idea is: codes in column D are taken from column A - and mached up with codes from column B

    A B D

    X205425 X304460 X304460
    X219159 X304450 X304450
    X201105 X304439 X304439
    X220783 X304412 X304412
    X004771 X304410 X304410
    X204874 X304387 X304387
    X229855 X304387 X304387
    X004959 X304386 X304386
    X000804 X304385 X304385
    X005421 X304385 X304385
    X221177 X304385 X304385
    etc
    Last edited by Arty_1; 10-23-2014 at 04:26 PM.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,785

    Re: A problem with an IF formula - matching values

    I tested before I supplied you with an answer. I went down the file and there were valid items listed in column D. What do you want to appear in Column D if there is no match. With my formula, an NA appears if you have a value in Column B and it does not appear in Column A. If this is not what you require, then I urge you to reframe your question and be more specific.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: A problem with an IF formula - matching values

    Then Alan's formula is the correct one. The first value in B that is also in A is line 142

    You can then select the 3 columns and Sort (Z to A) on "D"

  8. #8
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A problem with an IF formula - matching values

    Sorry, I'll try to be more precise. It's not mandatory for the codes to be in one line in columns A and B,

    whereas codes in column B and D must be on one line.

    The principle is: the code is taken from column A and it's brought to column D where it meets the same code from column B.

    E.g. A198 and B4661, consequently column D must be equal with A198

    (or e.g. A186 and B2345)

+ 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. Formula for matching values in two different sheets, then getting a sum?
    By wench_02 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2014, 09:11 AM
  2. Matching time values problem
    By species8514 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-17-2013, 06:47 AM
  3. Matching Values - Formula Question
    By Girish Punjabi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2013, 01:59 PM
  4. Matching formula Problem with OR function
    By Shark Man in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2010, 11:20 AM
  5. Matching the values of 2 columns...problem
    By sharkyshark in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2008, 11:02 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