Formule qui prend une ressource phénoménale

Bonjour,

Dans un fichier que très mal foutu que j'ai récupéré, j'ai cette formule ci-dessous qui prend une ressource phénomale:

=SI(Plan!K$5=$A2;Plan!K$6)+SI(Plan!K$8=$A2;Plan!K$9)+SI(Plan!K$11=$A2;Plan!K$12)+SI(Plan!K$14=$A2;Plan!K$15)+SI(Plan!K$17=$A2;Plan!K$18)+SI(Plan!K$20=$A2;Plan!K$21)+SI(Plan!K$23=$A2;Plan!K$24)+SI(Plan!K$26=$A2;Plan!K$27)+SI(Plan!K$29=$A2;Plan!K$30)+SI(Plan!K$32=$A2;Plan!K$33)+SI(Plan!K$35=$A2;Plan!K$36)+SI(Plan!K$38=$A2;Plan!K$39)+SI(Plan!K$41=$A2;Plan!K$42)+SI(Plan!K$44=$A2;Plan!K$45)+SI(Plan!K$47=$A2;Plan!K$48)+SI(Plan!K$50=$A2;Plan!K$51)+SI(Plan!K$53=$A2;Plan!K$54)+SI(Plan!K$56=$A2;Plan!K$57)+SI(Plan!K$59=$A2;Plan!K$60)+SI(Plan!K$62=$A2;Plan!K$63)+SI(Plan!K$65=$A2;Plan!K$66)+SI(Plan!K$68=$A2;Plan!K$69)+SI(Plan!K$71=$A2;Plan!K$72)+SI(Plan!K$74=$A2;Plan!K$75)+SI(Plan!K$77=$A2;Plan!K$78)+SI(Plan!K$80=$A2;Plan!K$81)+SI(Plan!K$83=$A2;Plan!K$84)+SI(Plan!K$86=$A2;Plan!K$87)+SI(Plan!K$89=$A2;Plan!K$90)+SI(Plan!K$92=$A2;Plan!K$93)+SI(Plan!K$95=$A2;Plan!K$96)+SI(Plan!K$98=$A2;Plan!K$99)+SI(Plan!K$101=$A2;Plan!K$102)+SI(Plan!K$104=$A2;Plan!K$105)+SI(Plan!K$107=$A2;Plan!K$108)+SI(Plan!K$110=$A2;Plan!K$111)+SI(Plan!K$113=$A2;Plan!K$114)+SI(Plan!K$116=$A2;Plan!K$117)+SI(Plan!K$119=$A2;Plan!K$120)+SI(Plan!K$122=$A2;Plan!K$123)+SI(Plan!K$125=$A2;Plan!K$126)+SI(Plan!K$128=$A2;Plan!K$129)+SI(Plan!K$131=$A2;Plan!K$132)+SI(Plan!K$134=$A2;Plan!K$135)+SI(Plan!K$137=$A2;Plan!K$138)+SI(Plan!K$140=$A2;Plan!K$141)+SI(Plan!K$143=$A2;Plan!K$144)+SI(Plan!K$146=$A2;Plan!K$147)+SI(Plan!K$149=$A2;Plan!K$150)+SI(Plan!K$152=$A2;Plan!K$153)+SI(Plan!K$155=$A2;Plan!K$156)+SI(Plan!K$158=$A2;Plan!K$159)+SI(Plan!K$161=$A2;Plan!K$162)+SI(Plan!K$164=$A2;Plan!K$165)+SI(Plan!K$167=$A2;Plan!K$168)+SI(Plan!K$170=$A2;Plan!K$171)+SI(Plan!K$173=$A2;Plan!K$174)+SI(Plan!K$176=$A2;Plan!K$177)+SI(Plan!K$179=$A2;Plan!K$180)+SI(Plan!K$182=$A2;Plan!K$183)+SI(Plan!K$185=$A2;Plan!K$186)+SI(Plan!K$188=$A2;Plan!K$189)+SI(Plan!K$191=$A2;Plan!K$192)+SI(Plan!K$194=$A2;Plan!K$195)+SI(Plan!K$197=$A2;Plan!K$198)+SI(Plan!K$200=$A2;Plan!K$201)+SI(Plan!K$203=$A2;Plan!K$204)+SI(Plan!K$206=$A2;Plan!K$207)+SI(Plan!K$209=$A2;Plan!K$210)+SI(Plan!K$212=$A2;Plan!K$213)+SI(Plan!K$215=$A2;Plan!K$216)+SI(Plan!K$218=$A2;Plan!K$219)+SI(Plan!K$221=$A2;Plan!K$222)+SI(Plan!K$224=$A2;Plan!K$225)+SI(Plan!K$227=$A2;Plan!K$228)+SI(Plan!K$230=$A2;Plan!K$231)+SI(Plan!K$233=$A2;Plan!K$234)+SI(Plan!K$236=$A2;Plan!K$237)+SI(Plan!K$239=$A2;Plan!K$240)+SI(Plan!K$242=$A2;Plan!K$243)+SI(Plan!K$245=$A2;Plan!K$246)+SI(Plan!K$248=$A2;Plan!K$249)+SI(Plan!K$251=$A2;Plan!K$252)+SI(Plan!K$254=$A2;Plan!K$255)+SI(Plan!K$257=$A2;Plan!K$258)+SI(Plan!K$260=$A2;Plan!K$261)+SI(Plan!K$263=$A2;Plan!K$264)+SI(Plan!K$266=$A2;Plan!K$267)+SI(Plan!K$269=$A2;Plan!K$270)+SI(Plan!K$272=$A2;Plan!K$273)+SI(Plan!K$275=$A2;Plan!K$276)+SI(Plan!K$278=$A2;Plan!K$279)+SI(Plan!K$281=$A2;Plan!K$282)+SI(Plan!K$284=$A2;Plan!K$285)+SI(Plan!K$287=$A2;Plan!K$288)+SI(Plan!K$290=$A2;Plan!K$291)+SI(Plan!K$293=$A2;Plan!K$294)+SI(Plan!K$296=$A2;Plan!K$297)+SI(Plan!K$299=$A2;Plan!K$300)+SI(Plan!K$302=$A2;Plan!K$303)+SI(Plan!K$305=$A2;Plan!K$306)+SI(Plan!K$308=$A2;Plan!K$309)+SI(Plan!K$311=$A2;Plan!K$312)+SI(Plan!K$314=$A2;Plan!K$315)+SI(Plan!K$317=$A2;Plan!K$318)+SI(Plan!K$320=$A2;Plan!K$321)+SI(Plan!K$323=$A2;Plan!K$324)+SI(Plan!K$326=$A2;Plan!K$327)+SI(Plan!K$329=$A2;Plan!K$330)+SI(Plan!K$332=$A2;Plan!K$333)+SI(Plan!K$335=$A2;Plan!K$336)+SI(Plan!K$338=$A2;Plan!K$339)+SI(Plan!K$341=$A2;Plan!K$342)+SI(Plan!K$344=$A2;Plan!K$345)+SI(Plan!K$347=$A2;Plan!K$348)+SI(Plan!K$350=$A2;Plan!K$351)+SI(Plan!K$353=$A2;Plan!K$354)+SI(Plan!K$356=$A2;Plan!K$357)+SI(Plan!K$359=$A2;Plan!K$360)+SI(Plan!K$362=$A2;Plan!K$363)+SI(Plan!K$365=$A2;Plan!K$366)+SI(Plan!K$368=$A2;Plan!K$369)+SI(Plan!K$371=$A2;Plan!K$372)+SI(Plan!K$374=$A2;Plan!K$375)+SI(Plan!K$377=$A2;Plan!K$378)+SI(Plan!K$380=$A2;Plan!K$381)+SI(Plan!K$383=$A2;Plan!K$384)+SI(Plan!K$386=$A2;Plan!K$387)+SI(Plan!K$389=$A2;Plan!K$390)+SI(Plan!K$392=$A2;Plan!K$393)+SI(Plan!K$395=$A2;Plan!K$396)+SI(Plan!K$398=$A2;Plan!K$399)+SI(Plan!K$401=$A2;Plan!K$402)+SI(Plan!K$404=$A2;Plan!K$405)+SI(Plan!K$407=$A2;Plan!K$408)+SI(Plan!K$410=$A2;Plan!K$411)+SI(Plan!K$413=$A2;Plan!K$414)+SI(Plan!K$416=$A2;Plan!K$417)+SI(Plan!K$419=$A2;Plan!K$420)+SI(Plan!K$422=$A2;Plan!K$423)+SI(Plan!K$425=$A2;Plan!K$426)+SI(Plan!K$428=$A2;Plan!K$429)+SI(Plan!K$431=$A2;Plan!K$432)+SI(Plan!K$434=$A2;Plan!K$435)+SI(Plan!K$437=$A2;Plan!K$438)+SI(Plan!K$440=$A2;Plan!K$441)+SI(Plan!K$443=$A2;Plan!K$444)+SI(Plan!K$446=$A2;Plan!K$447)+SI(Plan!K$449=$A2;Plan!K$450)+SI(Plan!K$452=$A2;Plan!K$453)+SI(Plan!K$455=$A2;Plan!K$456)+SI(Plan!K$458=$A2;Plan!K$459)+SI(Plan!K$461=$A2;Plan!K$462)+SI(Plan!K$464=$A2;Plan!K$465)+SI(Plan!K$467=$A2;Plan!K$468)+SI(Plan!K$470=$A2;Plan!K$471)+SI(Plan!K$473=$A2;Plan!K$474)+SI(Plan!K$476=$A2;Plan!K$477)+SI(Plan!K$479=$A2;Plan!K$480)+SI(Plan!K$482=$A2;Plan!K$483)+SI(Plan!K$485=$A2;Plan!K$486)+SI(Plan!K$488=$A2;Plan!K$489)+SI(Plan!K$491=$A2;Plan!K$492)+SI(Plan!K$494=$A2;Plan!K$495)+SI(Plan!K$497=$A2;Plan!K$498)+SI(Plan!K$500=$A2;Plan!K$501)+SI(Plan!K$503=$A2;Plan!K$504)+SI(Plan!K$506=$A2;Plan!K$507)+SI(Plan!K$509=$A2;Plan!K$510)+SI(Plan!K$512=$A2;Plan!K$513)+SI(Plan!K$515=$A2;Plan!K$516)+SI(Plan!K$518=$A2;Plan!K$519)+SI(Plan!K$521=$A2;Plan!K$522)+SI(Plan!K$524=$A2;Plan!K$525)+SI(Plan!K$527=$A2;Plan!K$528)+SI(Plan!K$530=$A2;Plan!K$531)+SI(Plan!K$533=$A2;Plan!K$534)+SI(Plan!K$536=$A2;Plan!K$537)+SI(Plan!K$539=$A2;Plan!K$540)+SI(Plan!K$542=$A2;Plan!K$543)+SI(Plan!K$545=$A2;Plan!K$546)+SI(Plan!K$548=$A2;Plan!K$549)+SI(Plan!K$551=$A2;Plan!K$552)+SI(Plan!K$554=$A2;Plan!K$555)+SI(Plan!K$557=$A2;Plan!K$558)+SI(Plan!K$560=$A2;Plan!K$561)+SI(Plan!K$563=$A2;Plan!K$564)+SI(Plan!K$566=$A2;Plan!K$567)+SI(Plan!K$569=$A2;Plan!K$570)+SI(Plan!K$572=$A2;Plan!K$573)+SI(Plan!K$575=$A2;Plan!K$576)+SI(Plan!K$578=$A2;Plan!K$579)+SI(Plan!K$581=$A2;Plan!K$582)+SI(Plan!K$584=$A2;Plan!K$585)+SI(Plan!K$587=$A2;Plan!K$588)+SI(Plan!K$590=$A2;Plan!K$591)+SI(Plan!K$593=$A2;Plan!K$594)+SI(Plan!K$596=$A2;Plan!K$597)+SI(Plan!K$599=$A2;Plan!K$600)+SI(Plan!K$602=$A2;Plan!K$603)+SI(Plan!K$605=$A2;Plan!K$606)+SI(Plan!K$608=$A2;Plan!K$609)+SI(Plan!K$611=$A2;Plan!K$612)+SI(Plan!K$614=$A2;Plan!K$615)+SI(Plan!K$617=$A2;Plan!K$618)+SI(Plan!K$620=$A2;Plan!K$621)+SI(Plan!K$623=$A2;Plan!K$624)+SI(Plan!K$626=$A2;Plan!K$627)+SI(Plan!K$629=$A2;Plan!K$630)

Someone aurait-il une fonction ou macro plus simpliifée afin d'éviter toute cette ressource nécessaire au celcul de cette dernière?

Pour info cette formule me sert à calculer le nombre d'heure par activité et par date dans la feuille entère ci-dessous:

image

Exemple: pour l'acitivité "Dépôt", j'ai 7 heures de charge de travail pour la date du 23/03.

D'avance merci de votre aide.

Cordialement

Bonjour,

Avec la formule :

=SOMMEPROD(Plan!$K$6:$K$630;(DECALER(Plan!$K$6:$K$630;-1;0)=$A$2)*1)

Pour le moment àa ne marche pas... es-ce que je peux te mettre un bout de fichier?

Bonjour Didi654613,

Ci-joint une proposition avec une fonction personnalisée réalisée selon les copies d'écran communiquées, la formule publiée faisant référence à une cellule A2 non visible et une colonne K non visible également.

La fonction personnalisée s'appelle SOMME_CHARGE_MO(critere, plage).

Donc, par analogie avec la formule publiée, =SOMME_CHARGE_MO($A2;Plan!K$5:K$630)

Le code est à copier/coller dans le fichier concerné.

7classeur1.xlsm (13.06 Ko)

Bonjour Antoine DL,

Tout d'abord merci pour ton retour.

Désolé je reponds un peu tarivement... malheureusement ça ne fonctionne pas, est-ce que je peux te mettre un bout du fichier pour que tu puisses comprendre?

Cordialement

Bonjour Didi654613,

Oui en supprimant les informations nominatives.

C'est étrange que la formule personnalisée ne fonctionne pas car c'est la réplique raccourcie de la mega formule figurant dans le 1er message. Et dans la feuille test que j'ai reconstituée cela fonctionne.

Bonjour Antoine,

Je te mets le lien du fichie ci-dessou, dans la feuille Plan Stator toutes les pièces avec les activités par ligne et le nombre d'heures dessous

https://www.sendspace.com/file/botphw

Cordialement,

Dans quelle cellule est renseignée la formule du 1er message ?

j'avais crée une feuille pour ça, actuellement il n'y en a plus

je te mets un lien avec une version intérieure ou la formule du premier message se trouve dans la feuille charge Indus (Cellule BW2).

https://www.sendspace.com/file/aj70p9

Bonjour,

Après analyse, il semblerait que les principales raisons qui expliquent que le fichier soit particulièrement gourmand en ressources sont (ce n'est donc pas 1 formule seulement) :

- présence de formules matricielles qui intègrent des plages bien trop importantes par rapport à la réalité des données (pas sur qu'elles soient indispensables car les formules semblent fonctionner aussi bien sans l'approche matricielle)

- un nombre important de cellules intègre des formules sur des lignes et/ou des colonnes entières, le plus souvent inutilement

Exemples :

- sur la ligne 5 de la feuille Plan, figure une formule matricielle qui intègre une plage de la colonne M à AAJ horizontalement et sur toute la colonne M verticalement, soit 712 colonnes x 1 048 000 lignes. Formule répliquée par la suite sur des centaines de cellules de la même feuille.

- sur les 7 premières colonnes de la feuille Sketchs, figurent des formules contenant des plages de la colonne Q à la colonne XFD, soit plus de 16000 colonnes.

Une idée serait de borner les plages, afin d'éviter des calculs inutiles sur des lignes ou colonnes entières. Cette manière présente comme avantage de ne pas remettre à jour les formules lors de l'ajout de nouvelles données. L'inconvénient est que chaque nouvelle saisie déclenche des calculs particulièrement longs.

Personnellement, je n'irai pas plus loin car ce forum n'a pas pour but de demander un investissement en temps pour modifier en profondeur les outils de travail d'une entreprise.

Bon courage !

Rechercher des sujets similaires à "formule qui prend ressource phenomenale"