Skip i'r prif gynnwys

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

Yn Excel, gallwch chi gyfrifo cyfartaledd y 5 gwerth diwethaf yn gyflym mewn colofn gyda'r swyddogaeth Gyfartalog, ond, o bryd i'w gilydd, mae angen i chi nodi rhifau newydd y tu ôl i'ch data gwreiddiol, ac rydych chi am i'r canlyniad cyfartalog gael ei newid yn awtomatig fel y data newydd sy'n mynd i mewn. Hynny yw, hoffech chi gael y cyfartaledd bob amser yn adlewyrchu 5 rhif olaf eich rhestr ddata, hyd yn oed pan fyddwch chi'n ychwanegu rhifau nawr ac yn y man.

5 gwerth olaf colofn ar gyfartaledd fel rhifau newydd sy'n mynd i mewn gyda fformwlâu


swigen dde glas saeth 5 gwerth olaf colofn ar gyfartaledd fel rhifau newydd sy'n mynd i mewn gyda fformwlâu

Efallai y bydd y fformwlâu arae canlynol yn eich helpu i ddatrys y broblem hon, gwnewch fel a ganlyn:

Rhowch y fformiwla hon mewn cell wag:

=IF(COUNT(A:A),AVERAGE(INDEX(A:A,LARGE(IF(ISNUMBER(A1:A10000),ROW(A1:A10000)),MIN(5,COUNT(A1:A10000)))):A10000),"no data") (A: A yw'r golofn sy'n cynnwys y data a ddefnyddiwyd gennych, A1: A10000 yn ystod ddeinamig, gallwch ei ehangu cyhyd â'ch angen, a'r rhif 5 yn nodi'r gwerth n olaf.), ac yna pwyswch Ctrl + Shift + Enter allweddi gyda'i gilydd i gael cyfartaledd y 5 rhif olaf. Gweler y screenshot:

doc-gyfartaledd-olaf-5-1

Ac yn awr, pan fyddwch yn mewnbynnu rhifau newydd y tu ôl i'r data gwreiddiol, bydd y cyfartaledd yn cael ei newid hefyd, gweler y screenshot:

doc-gyfartaledd-olaf-5-2

Nodyn: Os yw'r golofn o gelloedd yn cynnwys 0 gwerth, rydych chi am eithrio'r 0 gwerth o'ch 5 rhif diwethaf, ni fydd y fformiwla uchod yn gweithio, yma, gallaf gyflwyno fformiwla arae arall i chi i gael cyfartaledd y 5 gwerth olaf nad ydynt yn sero. , nodwch y fformiwla hon:

=AVERAGE(SUBTOTAL(9,OFFSET(A1:A10000,LARGE(IF(A1:A10000>0,ROW(A1:A10000)-MIN(ROW(A1:A10000))),ROW(INDIRECT("1:5"))),0,1))), ac yna'r wasg Ctrl + Shift + Enter allweddi i gael y canlyniad sydd ei angen arnoch, gweler y screenshot:

doc-gyfartaledd-olaf-5-3


Erthyglau cysylltiedig:

Sut i gyfartaledd pob 5 rhes neu golofn yn Excel?

Sut i gyfartaledd gwerthoedd 3 uchaf neu isaf 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 (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Bonjour,

La formule ne fonctionnant pas chez moi, et ayant un fort besoin de l'avoir, j'ai creusé l'affaire.
Je ne comprenais pas pourquoi utiliser la fonction LARGE qui n'est là que si on cherche la plus grande valeur d'une colonne, qui n'est pas forcément dans les 5 derniers.

Donc, voici une formule simple (en français, mais vous trouverez facilement l'équivalent anglais) :
=MOYENNE(INDEX(A2:A1000;NB(A2:A1000)-5+1):A1000)
This comment was minimized by the moderator on the site
Hello Yves,

You can use the simple formula: =AVERAGE(OFFSET(A1,COUNT(A:A),0,-5)). Please have a try. Please see the attached picture.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
25% x (r) = (n), rounded up to the next whole number = (a) then the top (a) race points are averaged together to get the total race points (p) for the week.

Example: 25%x9 = 2.25 rounded up to 3. Top 3 races of the 9 races are averaged to get the total points for the week.

How do I create a formula in excel for this?
This comment was minimized by the moderator on the site
Hello, I would like average the lowest 10 values of the last 20 added to a set of data. After reading this one here and another one of your examples, I now know how to average the lowest 10 values of 20 and how to grab only the last 20 values for averaging, but I need to combine them so I only average the lowest 10 values of the last and or most resent 20 add to the set of data. Please let me know if you can help, thank you JT.
This comment was minimized by the moderator on the site
=IF(COUNT(A:A),AVERAGE(INDEX(A:A,LARGE(IF(ISNUMBER(A1:A10000),ROW(A1:A10000)),MIN(5,COUNT(A1:A10000)))):A10000),"no data")

Does not work for me.

Here is my version:
=IF(COUNT(C:C),AVERAGE(INDEX(C:C,LARGE(IF(ISNUMBER(C2:C10000),ROW(C2:C10000)),MIN(5,COUNT(C2:C10000))))):C10000)

The error I get is: Wrong data type.
This comment was minimized by the moderator on the site
Hello, Paul,
Do you press the Ctrl + Shift + Enter keys together after pasting the above formula?
Please try it.
This comment was minimized by the moderator on the site
I tried the formual =IF(COUNT(A:A),AVERAGE(INDEX(A:A,LARGE(IF(ISNUMBER(A1:A10000),ROW(A1:A10000)),MIN(5,COUNT(A1:A10000)))):A10000),"no data") then did COMMAND RETURN on my Mac and the formula worked but it didn't average the lowest 10 of the last 20 values correctly.I would like to average the lowest 8 values of of the last or most recent 20 values in a dynamic range as I enter a new value every day. Any help would be greatly appreciated!
This comment was minimized by the moderator on the site
Hello, Don,To solve your problem, please apply the below array formula:=AVERAGE(SMALL(IF((A1:A10000<>0)*(IF(ISNUMBER(A1:A10000),ROW(A1:A10000))=LARGE(IF(ISNUMBER(A1:A10000),ROW(A1:A10000)),{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20})),A1:A10000),{1,2,3,4,5,6,7,8}))
After inserting the formula, please press 
This comment was minimized by the moderator on the site
Thank you! When I verify I do not get the correct value. My last 20 values are as follows: 0.0    0.2    8.9    2.9    8.1    8.1    8.1    5.3    8.1    0.4    6.6    -0.5    0.2    9.0    9.0    5.1    3.6    1.9    4.6    1.3Your array gives an average of 1.2 for the 8 lowest valuesMy average is 0.8 for the 8 lowest values.Not sure what went wrong?
This comment was minimized by the moderator on the site
I think it doesn't average zero. I tired <=> and that is not a solution.
This comment was minimized by the moderator on the site
Hi, Don,Yes, as you said, the formula exclude the 0s when averaging, if you want to average with 0s, please apply the below formula:=AVERAGE(SMALL(IF(ISNUMBER(A1:A10000)*(IF(ISNUMBER(A1:A10000),ROW(A1:A10000))=LARGE(IF(ISNUMBER(A1:A10000),ROW(A1:A10000)),{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20})),A1:A10000),{1,2,3,4,5,6,7,8}))
Please remember to press Ctrl + Shift + Enter keys together.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations