+ Reply to Thread
Results 1 to 7 of 7

Multiple Criteria

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    7

    Multiple Criteria

    Hey Excel Forum Community,

    I am in need of some help. I believe this should be an easy fix (well for someone out there), but I can't seem to figure it out. Here what I am looking for. I need to be able see if from Sheet1, the ID numbers in Row 1, appear next to the specific date in Sheet1 column A in the two columns in sheet2 (ex. does ID number 152 (Sheet1 Cell B2) appear on 2/16/2012 from Sheet 2, if it does I want cell B2 on Sheet 1 to say 'Staffed', if it does not appear I want it to say 'Unstaffed'; Does ID number 181 (Sheet1 Cell C2) appear next to 2/16/2012 on Sheet 2 if it does I want 'Staffed' to appear in Sheet1 cell C2, if not I want 'Unstaffed' to appear.). I need to be able to do this for each id number for each date listed on Sheet1.

    Also, If the ID number appears multiple times for the same date on Sheet2 I would like to be able to add a column in Sheet1 to show how many times that ID number appears on Sheet2 next to the specified date on . Please advise, I want to learn the formula(s) for both of these solutions I'm looking for but eventually turn this into a Macro.

    I hope this all makes sense, if something isn't clear please do not hesitate to ask questions. I look forward to someones help

    Sheet1
    Column:
    152 181 201 222 551 864 1136 1168 1258 etc.
    2/16/2012
    2/17/2012
    2/18/2012
    2/19/2012
    etc.


    Sheet2

    1136 2/16/2012
    1136 2/16/2012
    864 2/16/2012
    1459 2/16/2012
    201 2/17/2012
    181 2/17/2012
    1414 2/17/2012
    864 2/17/2012
    1136 2/17/2012
    688 2/17/2012
    688 2/17/2012
    1168 2/17/2012
    1459 2/17/2012
    152 2/17/2012
    1136 2/17/2012
    1414 2/17/2012
    1168 2/18/2012
    688 2/18/2012
    864 2/18/2012
    688 2/18/2012
    688 2/19/2012
    688 2/19/2012
    152 2/19/2012
    864 2/19/2012
    etc. etc.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-27-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Multiple Criteria - NEED HELP!!!!

    Please ignore the columns I attempted to put into the thread (formatting threw it all out of whack), I have attached an example spreadsheet...hope this helps

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

    Re: Multiple Criteria - NEED HELP!!!!

    In cell B3 type

    Please Login or Register  to view this content.
    and then copy it down and over to the appropriate cells.

    For the count exercise, look at this Mr.Excel Video

    http://www.youtube.com/watch?v=RF_-f...ure=digest_fri

    Alan
    Last edited by alansidman; 04-28-2012 at 11:19 AM.
    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

  4. #4
    Registered User
    Join Date
    04-27-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Multiple Criteria - NEED HELP!!!!

    @Alansidman - thanks man, for the formula...I believe you got me one step closer to what I'm trying to accomplish. Now the only problem that I am running into now is if the ID number appears in multiple dates in Sheet2, it will only bring back 'Staffed' on Sheet1 for the first date the ID numbers appears. For example, on the example spreadsheet I attached, ID number 1136 (N2) on Sheet1 appears on 2/16/2012, 2/17/2012, 2/18/2012, etc. on Sheet2, but when I place the formula you suggested in N3 on Sheet1 and copy it down through N11, the only cell that brings back 'Staffed' is 2/16/2012 (N3) when it should be bringing it back for N3, N4, N5, etc. I believe this is a limitations for the vlookup formula, but I know there is a way around this.

    To give you an idea of what I'm trying to build, I'm looking to show a matrix that will allow me to see what Store ID numbers were staffed on a specific date and what ones were not.

    Any suggestions? I have attached the "updated" spreadsheet with the formula you suggested above
    Attached Files Attached Files
    Last edited by NextCEO...; 04-28-2012 at 11:57 AM.

  5. #5
    Registered User
    Join Date
    04-27-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Multiple Criteria - NEED HELP!!!!

    I'm still having issues with attempting to have the vlookup formula (mentioned above) to return a "Staffed" for each date the ID number appears (see second attached spreadsheet). Any advice, suggestions, new formula, vba, etc will greatly help..

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

    Re: Multiple Criteria - NEED HELP!!!!

    I was able to generate a report in Access that looks similar to what you are looking for in a cross tab query. Do you have Access available to you. Here is what it looks like in Access.
    Attached Images Attached Images

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Multiple Criteria

    try the adjusted formula below, copy down and across....

    Please Login or Register  to view this content.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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