+ Reply to Thread
Results 1 to 3 of 3

Matching data and multiple if statements

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    Ulm
    MS-Off Ver
    Excel 2003
    Posts
    28

    Matching data and multiple if statements

    Hello,

    I have 3 columns. One has the customer ID (code A) that also has the column that tells if the customer is target or not (yes or no)-column B). In 3rd column I have another customer id Code B . Now I want to do the following. I want to match these two id’s and if they match (meaning that the code from column C can be found in the column A look at column B and if the cell value from column B is yes write TARGET (in column D) and if it is No write Not Target and If the codes don’t ,match write NOT match.

    I would use If(match, but then as you can see there are to much if statements. The other idea is to replace Yes and No with Target and Not target and then in if statement use the cell value from column B.

    Thanks
    Attached Files Attached Files
    Last edited by bjelinski; 07-06-2010 at 05:20 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Matching data and multiple if statements

    Try:

    =IF(ISNUMBER(MATCH(C2,A:A,0)),IF(VLOOKUP(C2,A:B,2,0)="Yes","Target","Not Target"),"Not Match")

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-22-2010
    Location
    Ulm
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Matching data and multiple if statements

    Thanks, it worked. Just quick question, when you define array by A:A , or A:B , that means that you are taking the whole column? I guess? The same effect would be if I define the whole column exactly , like $A$1:$A$10? I guess that's true.

    Anyway thanks!

+ 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