+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Compare a cell to a column and return one of a number of results

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    1

    Compare a cell to a column and return one of a number of results

    I have a sales force of about 500 people. Someone is trying to track if they are opening their bulletins. The program we use tells us of someone has opened a given publication, but goes no further (counting, averaging, stuff like that). Additionally, some publications don't go out to the entire sales team.

    I have a workbook with 2 sheets. Sheet 1 has columns:

    Name (entire sales force)
    Publication A
    Publication B...and so on.

    Sheet 2 has 2 columns:
    Name (these are the people it was sent to)
    Match (the person who gave me the sheet did a VLOOKUP, so each cell has either the name again or #N/A)

    I am trying to find to do a lot of things in one cell.
    Initial test: Compare Sheet1!A2 to Sheet2!A2:A999. (one name cell in sheet 1 to the entire list of names in sheet 2)
    Second test: If a match is found in Initial test, then compare Sheet1!A2 to Sheet2!B2:B999.(one name cell in sheet 1 to the vlookup results in sheet 2)

    If no initial match existed, display "N/A" (it wasn't sent to them)
    If an initial match existed but a second match did not exist, display 0, or "no", or anything just to say 'they were sent it, they didn't open it'
    If both searches provide a match, then display 1, or "yes", pretty much the reverse of above.

    I'm familiar with countifs, and I had started to approach the problem from that side, but these multiple searches are throwing me. I haven't found exactly what I wanted using MATCH or nested IFs, but I may not be mapping these out the right way.

    I'd prefer a non-macro way to do this if possible, but I'll take any answer that works. They've already shot my 'This really needs to be a database' recommendation down, I just want this off my desk at this point.

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

    Re: Compare a cell to a column and return one of a number of results

    Try:

    =IF(ISNUMBER(MATCH(A2,Sheet2!$A$2:$A$990,0)),IF(ISNUMBER(MATCH(A2,Sheet2!$B$2:$B$999,0)),"Yes","No"),"NA")
    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.

+ 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