Přejít k hlavnímu obsahu

Jak průměrovat buňky na základě více kritérií v aplikaci Excel?

V aplikaci Excel může být většina z nás obeznámena s funkcemi COUNTIF a SUMIF, mohou nám pomoci spočítat nebo sčítat hodnoty na základě kritérií. Ale pokusili jste se někdy vypočítat průměr hodnot na základě jednoho nebo více kritérií v aplikaci Excel?

Průměrné buňky na základě jednoho kritéria s funkcí Averageif

Průměrné buňky na základě více kritérií s funkcí Averageifs


šipka modrá pravá bublina Průměrné buňky na základě jednoho kritéria s funkcí Averageif

Předpokládám, že mám následující rozsah dat, sloupec A je seznam produktů a sloupec B jsou objednávky, nyní budu průměrovat buňky objednávky, kde je produkt KTE.

doc-avergae-s-kritérii-1

Zadejte tento vzorec do požadované buňky: =AVERAGEIF(A2:A19,D2,B2:B19), (A2: A19 jsou data, která obsahují kritéria, B2: B19 odkazuje na rozsah, který chcete průměrovat a D2 je kritérium, podle kterého chcete průměrovat hodnoty na základě), a stiskněte vstoupit klíč k získání výsledku, viz screenshot:

doc-avergae-s-kritérii-2


šipka modrá pravá bublina Průměrné buňky na základě více kritérií s funkcí Averageifs

Pokud chcete vypočítat průměr s více kritérii, Averageifs funkce vám může pomoci.

Syntaxe Averageifs takto:

AVERAGEIFS (průměrný_rozsah, rozsah_kritérií1, kritéria1, rozsah_kritérií2, kritéria2…)

  • Průměrný_rozsah: je rozsah buněk k průměru;
  • Rozsah_kritérií1, rozsah_kritérií2,… Jsou rozsahy, ve kterých se mají vyhodnotit související kritéria;
  • Kritéria 1, kritéria2,… Jsou kritéria, na kterých vycházíte.

Vezměte například výše uvedená data, nyní chci průměrovat pořadí KTE a objednávku větší než 500. Udělejte to takto:

Zadejte tento vzorec do prázdné buňky: =AVERAGEIFS(B2:B19,A2:A19,E1,B2:B19,">500")( A2: A19 jsou data, která obsahují kritéria1, B2: B19 odkazuje na rozsah, který chcete průměrovat, E1 a > 500 jsou kritéria 1 a kritéria 2), poté stiskněte vstoupit klíč k dosažení požadovaného výsledku. Viz snímek obrazovky:

doc-avergae-s-kritérii-3

Poznámka: Pokud máte více než dvě kritéria, která chcete, stačí přidat rozsahy kritérií a kritéria, která potřebujete: = AVERAGEIFS (C2: C19, A2: A19, F1, B2: B19, F2, C2: C19, "<500"), (A2: A19 a F1 jsou první rozsah a kritéria kritérií, B2: B19 a F2 jsou druhým rozsahem kritérií a kritérii, C2: C19 a <500 jsou Třetí rozsah a kritéria kritérií, C2: C19 odkazuje na rozsah vy chcete průměrovat hodnoty), viz screenshot:

doc-avergae-s-kritérii-4


Související články:

Jak průměrovat horní nebo dolní 3 hodnoty v aplikaci Excel?

Jak průměrovat posledních 5 hodnot sloupce při zadávání nových čísel?

Jak průměrovat každých 5 řádků nebo sloupců v aplikaci Excel?

Nejlepší nástroje pro produktivitu v kanceláři

🤖 Kutools AI asistent: Revoluční analýza dat založená na: Inteligentní provedení   |  Generovat kód  |  Vytvořte vlastní vzorce  |  Analyzujte data a generujte grafy  |  Vyvolejte funkce Kutools...
Populární funkce: Najít, zvýraznit nebo identifikovat duplikáty   |  Odstranit prázdné řádky   |  Kombinujte sloupce nebo buňky bez ztráty dat   |   Kolo bez vzorce ...
Super vyhledávání: Více kritérií VLookup    VLookup s více hodnotami  |   VLookup na více listech   |   Fuzzy vyhledávání ....
Pokročilý rozevírací seznam: Rychle vytvořte rozevírací seznam   |  Závislý rozbalovací seznam   |  Vícenásobný výběr rozevíracího seznamu ....
Správce sloupců: Přidejte konkrétní počet sloupců  |  Přesunout sloupce  |  Přepnout stav viditelnosti skrytých sloupců  |  Porovnejte rozsahy a sloupce ...
Doporučené funkce: Zaměření mřížky   |  Návrhové zobrazení   |   Velký Formula Bar    Správce sešitů a listů   |  Knihovna zdrojů (Automatický text)   |  Výběr data   |  Zkombinujte pracovní listy   |  Šifrovat/dešifrovat buňky    Odesílat e-maily podle seznamu   |  Super filtr   |   Speciální filtr (filtr tučné/kurzíva/přeškrtnuté...) ...
Top 15 sad nástrojů12 Text Tools (doplnit text, Odebrat znaky, ...)   |   50+ Graf Typ nemovitosti (Ganttův diagram, ...)   |   40+ Praktické Vzorce (Vypočítejte věk na základě narozenin, ...)   |   19 Vložení Tools (Vložte QR kód, Vložit obrázek z cesty, ...)   |   12 Konverze Tools (Čísla na slova, Přepočet měny, ...)   |   7 Sloučit a rozdělit Tools (Pokročilé kombinování řádků, Rozdělit buňky, ...)   |   ... a více

Rozšiřte své dovednosti Excel pomocí Kutools pro Excel a zažijte efektivitu jako nikdy předtím. Kutools for Excel nabízí více než 300 pokročilých funkcí pro zvýšení produktivity a úsporu času.  Kliknutím sem získáte funkci, kterou nejvíce potřebujete...

Popis


Office Tab přináší do Office rozhraní s kartami a usnadňuje vám práci

  • Povolte úpravy a čtení na kartách ve Wordu, Excelu, PowerPointu, Publisher, Access, Visio a Project.
  • Otevřete a vytvořte více dokumentů na nových kartách ve stejném okně, nikoli v nových oknech.
  • Zvyšuje vaši produktivitu o 50%a snižuje stovky kliknutí myší každý den!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I'm trying to create an average only if the row meets criteria in other columns. I need to only include the number in column J if that row has a "B" in column F and a "M" in column E. I've worked out the formula if it's only one condition:

=AVERAGEIF(F2:F114, "B", J2:J114)

But I can't work out how to get it to only average numbers in column J that meet both conditions?
This comment was minimized by the moderator on the site
Hello, Sally
To calculate the average based on multiple criteria, you can apply the AVERAGEIFS function, please use the below formula:
=AVERAGEIFS(J2:J114, F2:F114, "B", E2:E114, "M" )

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Thanks so much, this worked perfectly!
This comment was minimized by the moderator on the site
What formula would I use if I wanted to get my averages for a month but not count the days that are zero (0)? I am keeping track of my monthly electric usage but need to get an average even before the end of the months. Any ideas or help?
This comment was minimized by the moderator on the site
Hello, TFkidd
To solve your problem, please apply the below formula:
=AVERAGE(IF(B2:B31<>0,B2:B31))
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi there
I am trying to calculate percentage of people from across 4 regions (entered in column b)
and percentage by ethnicity (entered in column D)
I can calculate the average age and percentage of ages, but I can't seem to find a formula to calculate the regions and ethnicity. Any suggestions would be appreciated, thanks Tracy
This comment was minimized by the moderator on the site
To get an average of data in a column with multiple criteria the following formulae may be used.

Syntax = AVERAGEIFS (Range, Range 1, criteria 1, range 2, criteria 2)

In this case, my requirement is to find the average of the data in a range of numbers, without considering '0 - Zero' & values greater that '3000'.

Total data in the range is 31 nos ,

And the formulae will be

=AVERAGEIFS(G5:G35,G5:G35, "> 3000", G5:G35,"<>0")
This comment was minimized by the moderator on the site
I have 4 variables: 1st: Date of onset, 2nd: Date of termination, 3rd: Date of measurement, 4th: measurement. I want to calculate the average of the 4th variable between each period of onset-termination. How can i do it? I think its a bit tricky. Each date of onset has an counterpart date of termination. The same applies for the 3rd and 4th variable.
How can i make this happen?
This comment was minimized by the moderator on the site
VBA code to average one or more ranges of nonzero numbers:


Option Explicit
Function avgNonZeros(ParamArray rangeList() As Variant) As Variant
'Returns the average for all nonzeros of rangeList.
'rangeList may be one or multiple ranges.
Dim cell As Range
Dim i As Long
Dim totSum As Long
Dim cnt As Long
DoEvents 'allows calculations prior to performing
avgNonZeros = 0 'default return
For i = LBound(rangeList) To UBound(rangeList)
For Each cell In rangeList(i)
If cell <> 0 Then
totSum = totSum + cell
cnt = cnt + 1
End If
Next cell
Next i
If cnt <> 0 Then avgNonZeros = totSum / cnt
End Function
This comment was minimized by the moderator on the site
Hi,
I have 200 observations. I need to get an average of 21st to 40th observations. I am struggling to set an averageif formula. Any suggestion will be appreciated.
This comment was minimized by the moderator on the site
I have a similar problem like example #3, but the difference is that I need the average between two dates instead of for a single month. Any suggestion?
This comment was minimized by the moderator on the site
Hello, Crist,

To solve your problem, please apply the below formula:
=AVERAGEIFS(C2:C15, A2:A15, F1, B2:B15, ">=" &F2, B2:B15, "<=" &G2, C2:C15, ">300")

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi there,


My is Pablo and I would like to ask you about this situation. I have got a column with several values and some of them are zeros. As they are dB measurements this is the array formula I use to get the average: =10*LOG(AVERAGE(10^(C3:C66/10)))

My problem is that I am trying to get with a formula that does not take in account the zeros.

I have tried the next formula but it seems that does not work for my situation: =10*LOG(AVERAGEif(C3:C66,"<>0",[10^(C3:C66/10)]))

It would be very apprecited if you could give me a hint to solve this problem.

Thank you in advance,

Pablo.
This comment was minimized by the moderator on the site
I want to take numbers in multiple columns and combine them into one average. I have three columns to average, I want two of the columns to count for 40% each and the remaining column to count for 20%. Is this possible? Thanks!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations