Forum Discussion
dubkri
Jan 10, 2020Copper Contributor
Excel
Bonjour, Je dois faire un travail et je ne sais pas comment le faire. J'ai 2 onglets : Besoin et Sommaire Dans l'onglet Sommaire, on y retrouve une liste d'équipement à la colonne A et la...
SergeiBaklan
Jan 11, 2020Diamond Contributor
dubkri
Kristina, couple of more variants for such model
First by formulas. In D2
=IFERROR(
INDEX(
$A$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1)),
AGGREGATE(15,6,
1/($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1))<>0) /
ISNUMBER($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1))) *
(ROW($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1)))-ROW($B$1)),
ROW()-ROW($D$1)
)
),""
)
similar in E2
=IFERROR(
INDEX(
$B$2:INDEX($B:$B,COUNTA($A:$A)+ROW($A$1)),
AGGREGATE(15,6,
1/($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1))<>0) /
ISNUMBER($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1))) *
(ROW($B$2:INDEX($A:$A,COUNTA($A:$A)+ROW($A$1)))-ROW($B$1)),
ROW()-ROW($D$1)
)
),""
)
and drag them down till empty cells appear. Above could be simplified a bit if don't use dynamic ranges.
Second is with Power Query. If we name source range as Eqp, query it, filter content on empty and zero values and return result back into the Excel sheet. Generate script is
let
Source = Excel.CurrentWorkbook(){[Name="Eqp"]}[Content],
PromotHeaders = Table.PromoteHeaders(
Source,
[PromoteAllScalars=true]
),
FilterBlanks = Table.SelectRows(
PromotHeaders,
each ([Qty] <> null and [Qty] <> 0)
)
in
FilterBlanks
Sample is attached.
- dubkriJan 14, 2020Copper Contributor
Merci beaucoup pour les réponses!
J'ai essayé les formules D2 et E2.
La formule fonctionne. Toutefois, le résultat est 0 au lieu d'inscrire "Ordinateur".
Nous avons cherché et nous ne comprenons pas pourquoi. Pouvez-vous nous aider?
Merci!