Skip to main content

Conas cealla a mheánú bunaithe ar chritéir iolracha in Excel?

In Excel, d’fhéadfadh go mbeadh cur amach ag an gcuid is mó againn ar fheidhmeanna COUNTIF agus SUMIF, is féidir leo cabhrú linn luachanna a chomhaireamh nó a shuimiú bunaithe ar chritéir. Ach an ndearna tú iarracht riamh meán na luachanna a ríomh bunaithe ar chritéar amháin nó níos mó in Excel?

Meánchealla bunaithe ar chritéar amháin le feidhm Averageif

Meánchealla bunaithe ar chritéir iolracha a bhfuil feidhm Averageifs acu


mboilgeog cheart gorm saighead Meánchealla bunaithe ar chritéar amháin le feidhm Averageif

Ag ceapadh, tá an raon sonraí seo a leanas agam, is é colún A liosta an táirge agus is é colún B na horduithe, anois, meánóidh mé na cealla ordaithe ina bhfuil an táirge KTE.

doc-avergae-le-critéir-1

Cuir an fhoirmle seo isteach sa chill atá uait: =AVERAGEIF(A2:A19,D2,B2:B19), (A2: A19 na sonraí ina bhfuil na critéir, B2: B19 tagraíonn sé don raon is mian leat a mheánú agus D2 an critéar ar mhaith leat na luachanna atá bunaithe air a mheánú), agus brúigh Iontráil eochair chun an toradh a fháil, féach an scáileán:

doc-avergae-le-critéir-2


mboilgeog cheart gorm saighead Meánchealla bunaithe ar chritéir iolracha a bhfuil feidhm Averageifs acu

Más mian leat meán a ríomh le critéir iolracha, beidh an Meánifs féadfaidh feidhm cabhrú leat.

Seo a leanas comhréir na Meán:

AVERAGEIFS (Meán_range, critéir_range1, critéir1, critéir_range2, critéir2…)

  • Meán_range: an bhfuil raon na gcealla ar an meán;
  • Critéir_range1, critéir_range2,… An bhfuil na raonta ann chun na critéir bhainteacha a mheas;
  • Critéir1, critéir2,… Is critéir iad a bhfuil tú bunaithe orthu.

Tóg na sonraí thuas mar shampla, anois, ba mhaith liom ord KTE agus an t-ordú níos mó ná 500 a mheánú. Déan mar seo le do thoil:

Iontráil an fhoirmle seo i gcill bhán: =AVERAGEIFS(B2:B19,A2:A19,E1,B2:B19,">500")( A2: A19 is iad na sonraí ina bhfuil na critéir1, B2: B19 tagraíonn sé don raon is mian leat a mheánú, E1 agus > 500 is iad na critéir1 agus critéir 2), ansin brúigh Iontráil eochair chun an toradh a theastaíonn uait a fháil. Féach an pictiúr:

doc-avergae-le-critéir-3

Nóta: Má tá níos mó ná dhá chritéar agat a theastaíonn uait, ní gá duit ach na raonta critéar agus na critéir a theastaíonn uait a chur leis seo: = AVERAGEIFS (C2: C19, A2: A19, F1, B2: B19, F2, C2: C19, "<500"), (A2: A19 agus F1 is iad na chéad raon critéar agus critéir, B2: B19 agus F2 is iad raon agus critéir an dara critéar, C2: C19 agus <500 Is iad na tríú raon critéar agus critéir, C2: C19 tagraíonn sé don raon ag iarraidh na luachanna a mheánú), féach an scáileán:

doc-avergae-le-critéir-4


Earraí gaolmhara:

Conas meánluachanna barr nó bun 3 a fháil in Excel?

Conas na 5 luach dheireanacha de cholún a mheánú mar uimhreacha nua ag dul isteach?

Conas gach 5 shraith nó cholún in Excel a mheánú?

Uirlisí Táirgiúlachta Oifige is Fearr

🤖 Kutools AI Aide: anailís sonraí a réabhlóidiú bunaithe ar: Forghníomhú Chliste   |  Gin Cód  |  Cruthaigh Foirmlí Saincheaptha  |  Anailís a dhéanamh ar Sonraí agus Cairteacha a Ghin  |  Feidhmeanna Kutools a agairt...
Gnéithe Coitianta: Faigh, Aibhsigh nó Aithnigh Dúblaigh   |  Scrios Sraitheanna Bána   |  Comhcheangail Colúin nó Cealla gan Sonraí a Chailleadh   |   Babhta gan Foirmle ...
Cuardaigh Super: Ilchritéir VLookup    VLookup Illuachanna  |   VLookup Trasna Ilbhileoga   |   Amharc doiléir ....
Liosta anuas Casta: Go tapa Cruthaigh Liosta Anuas   |  Liosta anuas Cleithiúnach   |  Liosta Buail Isteach Ilroghnacha ....
Bainisteoir Colún: Cuir Líon Sonrach Colún leis  |  Colúin Bog  |  Scoránaigh Stádas Infheictheachta na gColún Ceilte  |  Déan comparáid idir Raonta & Colúin ...
Gnéithe Réadmhaoin: Fócas Eangaí   |  Amharc Dearaidh   |   Barra Mór na Foirmle    Leabhar Oibre & Bainisteoir Bileog   |  Leabharlann Acmhainní (Uaththéacs)   |  Piocálaí Dáta   |  Comhcheangail Bileoga Oibre   |  Criptigh/Díchriptigh Cealla    Seol Ríomhphost trí Liosta   |  Scagaire Super   |   Scagaire Speisialta (scagaire trom/iodálach/stailc tríd...) ...
Barr 15 Uirlisí12 Téacs uirlisí (Cuir Téacs, Bain Carachtair,...)   |   50 + Cairt cineálacha (Cairt Gantt,...)   |   40+ Praiticiúil Foirmlí (Ríomh aois bunaithe ar lá breithe,...)   |   19 Insertion uirlisí (Cuir isteach Cód QR, Ionsáigh Pictiúr ón gCosán,...)   |   12 Tiontú uirlisí (Uimhreacha le Focail, Comhshó Airgeadra,...)   |   7 Cumaisc & Scoilt uirlisí (Sraitheanna Comhcheangail Casta, Cealla Scoilt,...)   |   ... agus eile

Supercharge Do Scileanna Excel le Kutools le haghaidh Excel, agus Éifeachtúlacht Taithí Cosúil Ná Roimhe. Kutools le haghaidh Excel Tairiscintí Níos mó ná 300 Ardghnéithe chun Táirgiúlacht a Treisiú agus Sábháil Am.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

Tuairisc


Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
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