Faire une recherche en fonction de plusieurs critères

Résolu/Fermé
babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015 - 17 juin 2015 à 01:22
 babie971 - 27 juin 2015 à 00:14
bonsoir à tous,

voici un extrait d'un planning que j'utilise

TRI EMPLOI 02/07/15 02/07/15 02/07/15 02/07/15 02/07/15
SMT (CDQ) R1 R2 J R R
DNA (TE) R1 R2 J R R
PVA (CDQ) J J R R M
DSA (TE) J J R R M
VVA (CDQ) A A N N R1
KAY (TE) A A N N R1

Je cherche a renseigner automatiquement des cellules avec:

j'ai des cellules où je renseigne une date et un poste

Cellule Proposition1 : cherche dans mon tableau quel TRI correspond à l'emploi, la date et "J "
Cellule Proposition2 : cherche dans mon tableau quel TRI correspond à l'emploi, la date et "R "
Cellule Pproposition3: cherche dans mon tableau quel TRI correspond à l'emploi, la date et autre "R " suivant

en espérant avoir été clair.

merci d'avance pour votre aide.

3 réponses

JvDo Messages postés 1978 Date d'inscription mercredi 27 juillet 2005 Statut Membre Dernière intervention 28 septembre 2020 856
17 juin 2015 à 01:45
Bonsoir,

Mets ton fichier à disposition sur cjoint.com pour "éclaircir" tes explications.
Précise bien où et comment faire les fameuses propositions.

D'ailleurs, quid si pas de correspondance?

cordialement
0
babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015
18 juin 2015 à 02:27
Bonsoir et merci JvDo, pour le conseil aussi ci-après le lien Cjoint :

https://www.cjoint.com/c/EFsaxMQHffV

Merci d'avance pour l'aide que toi ou d'autres pourront me porter.

A bientôt
0
JvDo Messages postés 1978 Date d'inscription mercredi 27 juillet 2005 Statut Membre Dernière intervention 28 septembre 2020 856
18 juin 2015 à 07:33
Bonjour,

je te propose 3 formules matricielles :
en C16 :
=SI(OU($B16="M";$B16="N";$B16="A");SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="J");LIGNE(PLANNING!D$3:D$29)-2;9^9)));"");"")

en E16 :
=SI(OU($B16="M";$B16="N";$B16="A");SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9)));"");"")

en G16 :
=SI(OU($B16="M";$B16="N";$B16="A");SIERREUR(INDEX(PLANNING!$B$3:$B$29;PETITE.VALEUR(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9);2));"");"")

à recopier vers le bas et à valider par CTRL+MAJ+ENTER puisque matricielle.

cordialement
0
babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015
19 juin 2015 à 00:52
Merciiiiiiiiiiiiiiiiiii !!!!!!!!! c'est parfait!!!!! ça marche du tonnerre!!
Tu es un génial, je vais tenter de saisir pas à pas tes fonctions

Mercii!!
0
babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015
19 juin 2015 à 01:33
Je te remercie pour ton aide, au risque d'abuser pourrais-tu dire comment je peux faire pour qu'en fait dès le P1 il fasse le choix de J ; si il n'y en a pas lors chercher R

de façon a toujours avoir un solution en P1 et ainsi de suite.

merci d'avance!!!
0
JvDo Messages postés 1978 Date d'inscription mercredi 27 juillet 2005 Statut Membre Dernière intervention 28 septembre 2020 856 > babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015
19 juin 2015 à 12:19
Bonjour,

il suffit de tester l'existence d'un résulta en "J" :

en C16 :
=SI(OU($B16="M";$B16="N";$B16="A");SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="J");LIGNE(PLANNING!D$3:D$29)-2;9^9)));SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9)));""));"")

en E16 :
=SI(OU($B16="M";$B16="N";$B16="A");SI(SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="J");LIGNE(PLANNING!D$3:D$29)-2;9^9)));"")="";SIERREUR(INDEX(PLANNING!$B$3:$B$29;PETITE.VALEUR(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9);2));"");SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9)));""));"")

en G16 :
=SI(OU($B16="M";$B16="N";$B16="A");SI(SIERREUR(INDEX(PLANNING!$B$3:$B$29;MIN(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="J");LIGNE(PLANNING!D$3:D$29)-2;9^9)));"")="";SIERREUR(INDEX(PLANNING!$B$3:$B$29;PETITE.VALEUR(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9);3));"");SIERREUR(INDEX(PLANNING!$B$3:$B$29;PETITE.VALEUR(SI((PLANNING!$C$3:$C$29=$G$9)*(INDEX(PLANNING!$B$3:$Y$29;0;EQUIV($A16;PLANNING!$B$2:$Y$2;0))="R");LIGNE(PLANNING!D$3:D$29)-2;9^9);2));""));"")

on peut faire plus simple mais j'ai profité du copier/coller plutôt que de reconstruire les formules.

cordialement
0
JvDo Messages postés 1978 Date d'inscription mercredi 27 juillet 2005 Statut Membre Dernière intervention 28 septembre 2020 856
19 juin 2015 à 14:44
Bonjour,

voici un début d'explication de la formule en C16.
c'est dans l'onglet Planning
https://www.cjoint.com/c/EFtmRkFvIhX

cdlt
0
babie971 Messages postés 11 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 août 2015 > JvDo Messages postés 1978 Date d'inscription mercredi 27 juillet 2005 Statut Membre Dernière intervention 28 septembre 2020
19 juin 2015 à 18:30
tu es un chef Merciiiiiiii
0