Skip i'r prif gynnwys

Sut i gyfartaledd celloedd yn seiliedig ar feini prawf lluosog yn Excel?

Yn Excel, efallai y bydd y mwyafrif ohonom yn gyfarwydd â swyddogaethau COUNTIF a SUMIF, gallant ein helpu i gyfrif neu symio gwerthoedd yn seiliedig ar feini prawf. Ond a ydych erioed wedi ceisio cyfrifo cyfartaledd y gwerthoedd yn seiliedig ar un neu fwy o feini prawf yn Excel?

Celloedd cyfartalog yn seiliedig ar un maen prawf â swyddogaeth Averageif

Celloedd cyfartalog yn seiliedig ar feini prawf lluosog sydd â swyddogaeth Averageifs


swigen dde glas saeth Celloedd cyfartalog yn seiliedig ar un maen prawf â swyddogaeth Averageif

Gan dybio, mae gen i'r ystod ddata ganlynol, colofn A yw'r rhestr o gynnyrch a cholofn B yw'r archebion, nawr, byddaf yn cyfartaleddu'r celloedd archeb lle mae'r cynnyrch yn KTE.

doc-avergae-gyda-maen prawf-1

Rhowch y fformiwla hon yn eich cell ddymunol: =AVERAGEIF(A2:A19,D2,B2:B19), (A2: A19 yw'r data sy'n cynnwys y meini prawf, B2: B19 yn cyfeirio at yr ystod rydych chi am ei chyfartalu a D2 yw'r maen prawf rydych chi am gyfartaleddu'r gwerthoedd yn seiliedig arno), a gwasgwch Rhowch allwedd i gael y canlyniad, gweler y screenshot:

doc-avergae-gyda-maen prawf-2


swigen dde glas saeth Celloedd cyfartalog yn seiliedig ar feini prawf lluosog sydd â swyddogaeth Averageifs

Os ydych chi eisiau cyfrifo cyfartaledd gyda meini prawf lluosog, mae'r Cyfartaleddau gall swyddogaeth eich helpu chi.

Cystrawen Averageifs fel a ganlyn:

AVERAGEIFS (cyfartaledd_range, maen prawf_range1, meini prawf1, meini prawf_range2, meini prawf2…)

  • Cyfartaledd_range: a yw ystod y celloedd ar gyfartaledd;
  • Meini Prawf_range1, maen prawf_range2, ... yw'r ystodau ar gyfer gwerthuso'r meini prawf cysylltiedig;
  • Meini Prawf1, meini prawf2, ... yn feini prawf rydych chi'n seiliedig arnyn nhw.

Cymerwch y data uchod er enghraifft, nawr, rwyf am gyfartaleddu trefn KTE a'r archeb sy'n fwy na 500. Gwnewch fel hyn:

Rhowch y fformiwla hon mewn cell wag: =AVERAGEIFS(B2:B19,A2:A19,E1,B2:B19,">500")( A2: A19 yw'r data sy'n cynnwys y meini prawf1, B2: B19 yn cyfeirio at yr ystod rydych chi am ei chyfartalu, E1 ac > 500 yw'r meini prawf1 a meini prawf 2), yna pwyswch Rhowch allwedd i gael y canlyniad rydych chi ei eisiau. Gweler y screenshot:

doc-avergae-gyda-maen prawf-3

Nodyn: Os oes gennych chi fwy na dau faen prawf yr ydych chi eu heisiau, does ond angen i chi ychwanegu'r ystodau meini prawf a'r meini prawf sydd eu hangen arnoch chi fel hyn: = AVERAGEIFS (C2: C19, A2: A19, F1, B2: B19, F2, C2: C19, "<500"), (A2: A19 ac F1 yw'r ystod a'r meini prawf meini prawf cyntaf, B2: B19 ac F2 yw'r ail ystod meini prawf a meini prawf, C2: C19 ac <500 yw'r trydydd meini prawf ystod a meini prawf, C2: C19 yn cyfeirio at yr ystod Chi eisiau cyfartaleddu'r gwerthoedd), gweler y screenshot:

doc-avergae-gyda-maen prawf-4


Erthyglau cysylltiedig:

Sut i gyfartaledd gwerthoedd 3 uchaf neu isaf yn Excel?

Sut i gyfartaledd 5 gwerth olaf colofn wrth i rifau newydd ddod i mewn?

Sut i gyfartaledd pob 5 rhes neu golofn yn Excel?

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
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