✅ Objectif de la formule
Créer une numérotation automatique (N° Enreg
) :
-
Qui redémarre à 1 chaque mois
-
Basée sur
N° Facture
, ou à défaut, surRéférence
-
Sans utiliser de formule matricielle
Exemple du resultat attendu
Mois | N° Facture | Référence | N° Enreg |
---|---|---|---|
Janvier | F001 | 1 |
|
Janvier | F002 | 2 |
|
Janvier | F001 | 1 |
|
Janvier | R001 | 3 |
|
Janvier | R001 | 3 |
|
Février | F001 | 1 |
|
Février | R001 | 2 |
|
Février | F002 | 3 |
|
Février | F002 | 3 |
Can't respond to you in French, sorry. From what understand is that the long formula you have is not giving the correct result. Perhaps the formula I added in the last column of the table does. If not, please show the result you want to achieve in the your file.
Merci Rincy c est bien le résultat recherche et je suis même impressionné par la simplicité de votre raison et je vous en remercie cependant pouvez vous apporter une amélioration à la formule suivante : =SI([@[N° Facture]]<>"";SIERREUR(SI(NB.SI.ENS(INDIRECT("$F$2:F"&LIGNE()-1);$F3;INDIRECT("$B$2:b"&LIGNE()-1);[@Mois])=0;NB.SI.ENS(INDIRECT("$B$2:b"&LIGNE()-1);[@Mois])+1;INDEX(Tableau1[[N° Enreg]:[Libellé]];EQUIV($F3;[N° Facture];0);1));"");SI([@Référence]<>"";SIERREUR(SI(NB.SI.ENS( INDIRECT("$G$2:g"&LIGNE()-1);$G3;INDIRECT("$B$2:b"&LIGNE()-1);[@Mois])=0;NB.SI.ENS( INDIRECT("$B$2:b"&LIGNE()-1);[@Mois])+1;INDEX(Tableau1[[N° Enreg]:[Libellé]];EQUIV($G3;[Référence];0);1));"");"")) qui se trouve dans la colonne N° Enreg afin d obtenir le même résultat. Merci d avance
Desole Monsieur Riny pour l erreur sur votre nom
No worries!
I understand you want an improvement on your the formula you pasted. Though, it's in French and I'm not sure it's the same as in your file. But why would you want to change a rather complex formula if mine (quite simple) seems to resolve your problem?
@riny En fait c est du à un melange de frustration quand je me rend compte que j ai passé des jours pour quelque chose de si complexe aussi la resolution de cette enigme me permettra de revoir mon approche et mon analyse des situations parce que je veux atteindre un niveau d efficacite similaire au votre ce n est pas encore le cas.
voici un traduction du code en anglais =IF([@[Invoice No.]]<>"";IFERROR(IF(COUNTIFS.SENS(INDIRECT("$F$2:F"&LINE()-1);$F3;INDIRECT("$B$2:b"&LINE()-1);[@Month])=0;COUNTIFS.SENS(INDIRECT("$B$2:b"&LINE()-1);[@Month])+1;INDEX(Table1[[Record No.]:[Label]];EQUIV($F3;[Invoice No.];0);1));"");IF([@Reference]<>"";IFERROR(IF(COUNTIFS.SENS( INDIRECT("$G$2:g"&ROW()-1);$G3;INDIRECT("$B$2:b"&ROW()-1);[@Month])=0;COUNTIFS( INDIRECT("$B$2:b"&ROW()-1);[@Month])+1;INDEX(Table1[[Reg No.]:[Label]];EQUIV($G3;[Reference];0);1));"");""))
OK, then that is indeed the formula you had in your file. According to my "translator" your last message reads as follows:
"In fact it is due to a mixture of frustration when I realise that I spent days for something so complex also the resolution of this enigma will allow me to review my approach and my analysis of the situations because I want to reach a level of efficiency similar to yours this is not yet the case."
I don't understand the bolded part. Your current formula is very complicated and I understand that it doesn't return the correct results, but please correct me if I'm wrong.
@riny En fait je veux dire mon souhaite est d être aussi bon et efficace que vous pour l heure je n ai pas encore atteint ce niveau;
Merci pour votre excellente réponse.
aussi je souhaite crée un numéro de pièce compose du code journal BDA du mois 02 et du numéro que vous avez créé 001 002 ... 010. QUAND J ESSAIE AVEC LA FONCTION CONCATENER LES NUMERO ENREGISTREMENT NE FONCTIONNE PLUS CORRECTEMENT