Note: The other languages of the website are Google-translated. Back to English
Logáil isteach  \/ 
x
or
x
Cláraigh  \/ 
x

or

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ú?


Na hUirlisí Táirgiúlachta Oifige is Fearr

Réitíonn Kutools for Excel an chuid is mó de do chuid Fadhbanna, agus Méadaíonn sé do Tháirgiúlacht 80%

  • Athúsáid: Cuir isteach go tapa foirmlí casta, cairteacha agus aon rud a d'úsáid tú roimhe seo; Cealla a Chriptiú le pasfhocal; Cruthaigh Liosta Ríomhphoist agus seol ríomhphoist ...
  • Barra Foirmle Super (cuir línte iolracha téacs agus foirmle in eagar go héasca); Leagan Amach Léitheoireachta (líon mór cealla a léamh agus a chur in eagar go héasca); Greamaigh go dtí an Raon Scagtha...
  • Cumaisc Cealla / Sraitheanna / Colúin gan Sonraí a chailleadh; Ábhar Cealla Scoilt; Comhcheangail Sraitheanna / Colúin Dúblacha... Cill Dúblach a Chosc; Déan comparáid idir Ranganna...
  • Roghnaigh Dúblach nó Uathúil Sraitheanna; Roghnaigh Blank Rows (tá na cealla uile folamh); Aimsigh Super agus Fuzzy Aimsigh i go leor Leabhar Oibre; Roghnaigh go randamach ...
  • Cóip Díreach Cealla Il gan tagairt fhoirmle a athrú; Tagairtí Cruthaigh Auto chuig Bileoga Il; Cuir Urchair isteach, Boscaí Seiceála agus go leor eile ...
  • Sliocht Téacs, Cuir Téacs leis, Bain de réir Poist, Bain Spás; Subtotals Paging a chruthú agus a phriontáil; Tiontaigh Idir Ábhar Cealla agus Tráchtanna...
  • Scagaire Super (scéimeanna scagaire a shábháil agus a chur i bhfeidhm ar bhileoga eile); Ard-Sórtáil de réir míosa / seachtaine / lae, minicíocht agus níos mó; Scagaire Speisialta le cló trom, iodálach ...
  • Comhcheangail Leabhair Oibre agus Bileoga Oibre; Cumaisc Táblaí bunaithe ar eochaircholúin; Roinn Sonraí i Ilbhileoga; Baisc Tiontaigh xls, xlsx agus PDF...
  • Níos mó ná 300 gné chumhachtach. Tacaíochtaí Office / Excel 2007-2019 agus 365. Tacaíonn sé le gach teanga. Imscaradh éasca i d’fhiontar nó d’eagraíocht. Gnéithe iomlána triail saor in aisce 30 lá. Ráthaíocht ar ais airgid 60 lá.
cluaisín kte 201905

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á!
bun officetab
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Jenin J · 9 months ago
    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")
  • To post as a guest, your comment is unpublished.
    La · 11 months ago
    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?
  • To post as a guest, your comment is unpublished.
    Mark Main · 11 months ago
    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
  • To post as a guest, your comment is unpublished.
    Lutfur · 1 years ago
    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.
  • To post as a guest, your comment is unpublished.
    Crist · 1 years ago
    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?
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      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!
  • To post as a guest, your comment is unpublished.
    pablo · 2 years ago
    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.
  • To post as a guest, your comment is unpublished.
    Stephanie · 3 years ago
    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!
  • To post as a guest, your comment is unpublished.
    ch · 3 years ago
    I want to average cells is those cells are between a range.
    If A is between range 1 & range 2, average value in B. What formula would I use?
    Ex.
    A B Range 1 Range 2
    $78,093 651,462 55001 60000
    $76,968 636,679
    $76,946 1,682,295
    $73,909 142,277
    $73,567 624,257
    $71,505 492,828
    $67,772 351,316
    $63,786 458,169
    $63,263 157,665
    $58,427 180,498
    $56,693 187,028
    $56,510 73,339
    $56,129 80,832

    Thanks for any help.
  • To post as a guest, your comment is unpublished.
    Jackie · 4 years ago
    7
    $3.00
    20
    $40.00
    3
    $6.00
    0
    $-
    MY AVERAGE FOR CELL B3,B5,B7,B9 SHOULD BE 10
    MY COUNT FOR CELL B3,B5,B7,B9 SHOULD BE 3

    How do I get averages for specific cells excluding zero