SOLVED

Ignore duplicates with multiple criteria and between 2 dates

Copper Contributor

Hi all

I'm doing a training db and need to specify how many learners completed specific, accredited courses between 2 dates that are on a second sheet.

 

I have a list of names in Column A (some duplicated), Accredited (Yes or No) in Column D, Funding (A.C.T, Legacy, Zero Cost) in Column F, End Date in Column J, and Status (Completed, In Progress, TBC, etc.) in Column L - all on sheet 1 shown below.

 

The stats are on sheet 2 including the between dates which change according to the stats required.  Date 1 in cell A1, date 2 in cell A2.

 

I need to state how many students completed accredited courses that weren't funded by Legacy, between the two dates so that the figures will update on change of dates.

 

Can you help?  Thank you in advance.

 

Jules

Sheet 1

NameAccredited?FundingEnd DateStatus
Nother, AnthonyYesLegacy26/05/2021Completed
Bloggs, JoeYesLegacy26/05/2021Completed
Person, JamesNoLegacy01/07/2021Completed
Peartree, PattyNoLegacy01/07/2021Completed
Nother, AnthonyNoLegacy01/07/2021Completed
Lollipop, DaisyNoLegacy01/07/2021Completed
Dearheart, ANoLegacy01/07/2021Completed
Vimes, SamNoLegacy01/07/2021Completed
Door, BillNoLegacy01/07/2021Completed
Person, JamesYesLegacy06/07/2021Completed
Lollipop, DaisyYesLegacy06/07/2021Completed
Door, BillYesLegacy06/07/2021Completed
Vimes, SamYesLegacy13/07/2021Completed
Bloggs, JoeYesLegacy13/07/2021Completed
Person, JamesYesA.C.T.21/07/2021Completed
Ogg, NannyYesA.C.T.22/07/2021Completed
Peartree, PattyYesLegacy28/07/2021Completed
Nother, AnthonyYesLegacy28/07/2021Completed
Lollipop, DaisyYesLegacy28/07/2021Failed Course
Dearheart, AYesLegacy28/07/2021Completed
Evans, ChristopherYesZero Cost29/07/2021Waiting to Start
Peartree, PattyNoA.C.T.23/08/2021In Progress
Peartree, PattyYesZero Cost30/09/2021Completed
Baird, LogieYesA.C.T.30/09/2021In Progress
Nother, AnthonyNoA.C.T.05/10/2021Completed
Nother, AnthonyNoA.C.T.11/10/2021Completed

 

9 Replies

@Jules_Rapley 

=COUNTIFS('Sheet 1'!J2:J27,">="&'Sheet 2'!A1,'Sheet 1'!J2:J27,"<="&'Sheet 2'!A2,'Sheet 1'!D2:D27,"Yes",'Sheet 1'!L2:L27,"Completed",'Sheet 1'!I2:I27,"<>Legacy")

 

Is this what you are looking for?

If you can post a file it would be great

@OliverScheurich 

No.  That gives me what I can already get - which is great but I also need it to filter out duplicates of names so that each person is only counted once no matter how many times they completed these specific-type courses within the timeframe.

best response confirmed by Jules_Rapley (Copper Contributor)
Solution

@Jules_Rapley 

 

 

 

 

=COUNTA(
       UNIQUE(
             FILTER('Training DB'!A2:A27,
                     ('Training DB'!B2:B27="Yes")*
                     ('Training DB'!C2:C27<>"Legacy")*
                     ('Training DB'!G2:G27="Completed")*
                     ('Training DB'!F2:F27>=A1)*
                     ('Training DB'!F2:F27<=A2),""
                    )
              )
         )

 

 

 

 

@Jules_Rapley 

=SUMPRODUCT((COUNTIF('Training DB'!A2:A27,'Training DB'!A2:A27)=1)*('Training DB'!B2:B27="Yes")*('Training DB'!C2:C27<>"Legacy")*('Training DB'!G2:G27="Completed"))

Should I add in ('Training DB'!B2:B27,"Yes") to make it accredited only? If so, where should it go?
I just updated both formula and attached file. Check it out please.
Thank you so much! This is perfect!
1 best response

Accepted Solutions
best response confirmed by Jules_Rapley (Copper Contributor)
Solution

@Jules_Rapley 

 

 

 

 

=COUNTA(
       UNIQUE(
             FILTER('Training DB'!A2:A27,
                     ('Training DB'!B2:B27="Yes")*
                     ('Training DB'!C2:C27<>"Legacy")*
                     ('Training DB'!G2:G27="Completed")*
                     ('Training DB'!F2:F27>=A1)*
                     ('Training DB'!F2:F27<=A2),""
                    )
              )
         )

 

 

 

 

View solution in original post