Formule trop longue

Bonjour,

je suis en train d'écrire une formule, je l'ai testé et elle fonctionne très bien, le problème c'est qu'au final elle va être trop longue…

donc ma question est : est-il possible de la faire plus simplifiée ou sous vba?

=SI($H$5="s2";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s2");SI($H$5="s3";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s3");SI($H$5="s4";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s4");SI($H$5="s5";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s5");SI($H$5="s6";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s6");SI($H$5="s7";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s7");SI($H$5="s8";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s8");SI($H$5="s9";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s9");SI($H$5="s10";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s10");SI($H$5="s11";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s11");SI($H$5="s12";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s12");SI($H$5="s13";NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;"s13")))))))))))))

sachant que la elle n'est pas complète, je dois la continuer jusqu'à ce que H5 = s52... et que je dois faire de même avec une dizaine de cellules pour avoir d'autres données identiques mais avec un autre fournisseur.

Bonjour,

à tout hasard :

=NB.SI.ENS(bd_sorties!C:C;"1mp";bd_sorties!D:D;$H$5)

eric

bonjour eriiic,

simple et efficace je te remercie.

Rechercher des sujets similaires à "formule trop longue"