Blanchetdb
Board Regular
- Joined
- Jul 31, 2018
- Messages
- 161
- Office Version
- 2016
- Platform
- Windows
Hi
So, I have a macro that is repetitive with the only change is the name being searched. The macro works but I am limited on the number of names because I get an error message saying it is too large. Can someone help on condensing this maybe in a loop (not sure how to do that)
this macro repeats for another 3 names but then I am unable to add additional names
can someone please provide a solution on how to reduce this?
thanks
So, I have a macro that is repetitive with the only change is the name being searched. The macro works but I am limited on the number of names because I get an error message saying it is too large. Can someone help on condensing this maybe in a loop (not sure how to do that)
VBA Code:
Private Sub CommandButton1_Click()
Range("F15") = Range("D5")
If Range("D5") <> "" Then
Range("P17:P2000").AutoFilter Field:=1, Criteria1:=Range("D5").Value
End If
'All / TOUS
If Range("D5") = "" And Range("AB9") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("AD18:AD2000"), "0")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("AD18:AD2000"), "0")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("AD18:AD2000"), "0")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "0")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("AD18:AD2000"), "0")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("AD18:AD2000"), "0")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("AD18:AD2000"), "0")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("AD18:AD2000"), "0")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("AD18:AD2000"), "0")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("AD18:AD2000"), "0")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("AD18:AD2000"), "0")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("AD18:AD2000"), "0")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("AD18:AD2000"), "0")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "0")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("AD18:AD2000"), "0")
End If
If Range("D5") = "" And Range("AB10") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("AD18:AD2000"), "1")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("AD18:AD2000"), "1")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("AD18:AD2000"), "1")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "1")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("AD18:AD2000"), "1")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("AD18:AD2000"), "1")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("AD18:AD2000"), "1")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("AD18:AD2000"), "1")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("AD18:AD2000"), "1")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("AD18:AD2000"), "1")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("AD18:AD2000"), "1")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("AD18:AD2000"), "1")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("AD18:AD2000"), "1")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "1")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("AD18:AD2000"), "1")
End If
If Range("D5") = "" And Range("AB11") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("AD18:AD2000"), "2")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("AD18:AD2000"), "2")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("AD18:AD2000"), "2")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "2")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("AD18:AD2000"), "2")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("AD18:AD2000"), "2")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("AD18:AD2000"), "2")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("AD18:AD2000"), "2")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("AD18:AD2000"), "2")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("AD18:AD2000"), "2")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("AD18:AD2000"), "2")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("AD18:AD2000"), "2")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("AD18:AD2000"), "2")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "2")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("AD18:AD2000"), "2")
End If
If Range("D5") = "" And Range("AB12") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("AD18:AD2000"), "3")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("AD18:AD2000"), "3")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("AD18:AD2000"), "3")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "3")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("AD18:AD2000"), "3")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("AD18:AD2000"), "3")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "3")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "3")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "3")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("AD18:AD2000"), "3")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("AD18:AD2000"), "3")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("AD18:AD2000"), "3")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("AD18:AD2000"), "3")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("AD18:AD2000"), "3")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("AD18:AD2000"), "3")
End If
'Jarek Krukowski
If Range("D5") = "Jarek Krukowski" And Range("AB9") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "0")
End If
If Range("D5") = "Jarek Krukowski" And Range("AB10") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "1")
End If
If Range("D5") = "Jarek Krukowski" And Range("AB11") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "2")
End If
If Range("D5") = "Jarek Krukowski" And Range("AB12") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Jarek Krukowski", Range("AD18:AD2000"), "3")
End If
'Genève Fournier
If Range("D5") = "Genève Fournier" And Range("AB9") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "0")
End If
If Range("D5") = "Genève Fournier" And Range("AB10") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "1")
End If
If Range("D5") = "Genève Fournier" And Range("AB11") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "2")
End If
If Range("D5") = "Genève Fournier" And Range("AB12") = True Then
Range("I9") = WorksheetFunction.CountIfs(Range("X18:X2000"), "In Progress / Encours", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("I10") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed / Finalisé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("I11") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Ongoing / Finalisé - continu", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("I12") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Completed - Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("I13") = WorksheetFunction.CountIfs(Range("X18:X2000"), "Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("D9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "01 Planning Phase / Phase de planification", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("D10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "02 Poster Open / Affiche ouverte", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("D11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "03 Screening Phase / Phase de dépistage", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("D12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "04 Assessment Phase / Phase d'évaluation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("D13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "05 Process Being Finalized / Processus en cours de finalisation", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("G9") = WorksheetFunction.CountIfs(Range("T18:T2000"), "06 Process completed, Pool Created / Processus complété; bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("G10") = WorksheetFunction.CountIfs(Range("T18:T2000"), "07 Process completed, No Pool Created / Processus complété; sans bassin créé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("G11") = WorksheetFunction.CountIfs(Range("T18:T2000"), "08 Cancelled / Annulé", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("G12") = WorksheetFunction.CountIfs(Range("T18:T2000"), "09 Unproductive / Finalisé - improductif", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
Range("G13") = WorksheetFunction.CountIfs(Range("T18:T2000"), "10 Other - See Comments / Autres - Voir commentaires", Range("P18:P2000"), "Genève Fournier", Range("AD18:AD2000"), "3")
End If
this macro repeats for another 3 names but then I am unable to add additional names
can someone please provide a solution on how to reduce this?
thanks