+ Reply to Thread
Results 1 to 7 of 7

Matching multiple dates & crteria within Multiple column & the same column

  1. #1
    Registered User
    Join Date
    01-28-2009
    Location
    parkersburg, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Matching multiple dates & crteria within Multiple column & the same column

    I have looked through as many posts as possible to try to find the solution I am looking for here, but with no luck, or i can't understand some of the formulas that are posted to transfer them to my situation.

    What I have is 6 different columns of data, of which 2 columns have multiple criteria that I need to lookup and count at the same time. 1 being 2 dates I need to match, and the other being a code of "1" or "2" in the same column "UTA". BUT...there are other 3 criteria I need to meet at the same time.

    Bottom line, I am trying to see in a two day period (the specific dates above) how many people were paid for the whole weekend, and not just part of the weekend. Each day is separated into two periods ("UTA") 1 & 2, so I am looking for who got paid in all four periods.

    I have tried with sumproduct, but can't get it to not count the people who were only there 1 day or 1 period of the whole weekend.

    SUMPRODUCT(((((IDTUIC="WZMS*")*1+(FY="2012")*1+(ED=$A2)*1+(UTA="1")*1+(PAY="P")

    A2 & B2 are the reference to the dates I need to look for. They are on the rollup sheet I am entering in the formulas at.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-28-2009
    Location
    parkersburg, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Matching multiple dates & crteria within Multiple column & the same column

    Please help, I know this is possible, I just can't figure it out???

    Do you need more info?

    Thanks.

  3. #3
    Registered User
    Join Date
    02-21-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Matching multiple dates & crteria within Multiple column & the same column

    Have you tried to make it an array formula by pressing CSE ?

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Matching multiple dates & crteria within Multiple column & the same column

    Try this...

    =SUMPRODUCT((LEFT(IDTUIC,4)="WZMS")*(FY=2012)*(ED=$A2)*(UTA={1,2})*(PAY="P"))

    Since you are on Excel 2007, you can use COUNTIFS, which is faster than SUMPRODUCT

    =SUMPRODUCT(COUNTIFS(IDTUIC,"WZMS*",FY,2012,ED,$A2,UTA,{1,2},PAY,"P"))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    01-28-2009
    Location
    parkersburg, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Matching multiple dates & crteria within Multiple column & the same column

    Haseeb,
    Thanks for the assist, but I am afraid the formula gives me what I already have, although now I have a shorter formula for a previous roll-up number I was counting already!!! I need to know who was there all 4 periods for the whole two days, so UTA 1 & 2 & date 1 & date 2. Maybe a true false statement, and sum them up?
    This is what my full formula looked like, as I only inserted half of the formula the first time, sorry.
    =SUMPRODUCT(COUNTIFS(IDTUIC,"WZMS*",FY,2012,ED,$A2,UTA,{1,2},PAY,"P"))+SUMPRODUCT(COUNTIFS(IDTUIC,"WZMS*",FY,2012,ED,$B2,UTA,{1,2},PAY,"P"))

    This formula already gives me the count I have using =SUM(countifs....I need to figure out how to show only those people that were a P both periods (1&2) for both days??

    Thanks.

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Matching multiple dates & crteria within Multiple column & the same column

    i attached an example where i accomplished this using a second table, then checking the employes by name to see if they worked all 4 periods, then flaging them. The attached will help explain this more, but here is the formula used to check against an employee list. its a bit crude, but it gets the job done.

    =IF(COUNTIFS('IDT Raw Data'!B:B,A4,'IDT Raw Data'!E:E,$B$1,'IDT Raw Data'!G:G,1)+COUNTIFS('IDT Raw Data'!B:B,A4,'IDT Raw Data'!E:E,$B$1,'IDT Raw Data'!G:G,2)+COUNTIFS('IDT Raw Data'!B:B,A4,'IDT Raw Data'!E:E,$C$1,'IDT Raw Data'!G:G,1)+COUNTIFS('IDT Raw Data'!B:B,A4,'IDT Raw Data'!E:E,$C$1,'IDT Raw Data'!G:G,2)=4,"Worked","Not Worked")
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-28-2009
    Location
    parkersburg, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Matching multiple dates & crteria within Multiple column & the same column

    Yep, that would get me to what I need, but I can't do one person at a time (actual data page is 42,000 lines long). I need it to total (add up the "wroked") numbers all at once. I will mess with it, and see if I can add a countif.

    Thank for the assist, I learn something new everyday with excel it seems!!!

+ 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