메인 컨텐츠로 가기

새 숫자가 입력 될 때 열의 마지막 5 개 값을 평균화하는 방법은 무엇입니까?

Excel에서는 Average 함수를 사용하여 열의 마지막 5 개 값의 평균을 빠르게 계산할 수 있지만, 때때로 원본 데이터 뒤에 새 숫자를 입력해야하며 평균 결과가 다음과 같이 자동으로 변경되기를 원합니다. 새로운 데이터 입력. 즉, 가끔씩 숫자를 추가하는 경우에도 데이터 목록의 마지막 5 개 숫자를 항상 평균에 반영하고 싶습니다.

수식으로 입력하는 새 숫자로 열의 마지막 5 개 값 평균


화살표 블루 오른쪽 거품 수식으로 입력하는 새 숫자로 열의 마지막 5 개 값 평균

다음 배열 수식은이 문제를 해결하는 데 도움이 될 수 있습니다. 다음과 같이하십시오.

이 공식을 빈 셀에 입력하십시오.

=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 사용한 데이터가 포함 된 열입니다. A1 : A10000 동적 범위입니다. 필요에 따라 확장 할 수 있습니다. 5 마지막 n 값을 나타냅니다.) Ctrl + Shift + Enter 키를 함께 사용하여 마지막 5 개 숫자의 평균을 구합니다. 스크린 샷보기 :

문서 평균 마지막 5-1

이제 원래 데이터 뒤에 새 숫자를 입력하면 평균도 변경됩니다. 스크린 샷을 참조하십시오.

문서 평균 마지막 5-2

주의 사항: 셀 열에 0 값이 포함 된 경우 마지막 0 개 숫자에서 5 값을 제외하려면 위의 수식이 작동하지 않습니다. 여기서는 5이 아닌 마지막 XNUMX 개 값의 평균을 얻기 위해 다른 배열 수식을 소개 할 수 있습니다. , 다음 공식을 입력하십시오.

=AVERAGE(SUBTOTAL(9,OFFSET(A1:A10000,LARGE(IF(A1:A10000>0,ROW(A1:A10000)-MIN(ROW(A1:A10000))),ROW(INDIRECT("1:5"))),0,1))), 다음을 누릅니다. Ctrl + Shift + Enter 필요한 결과를 얻기위한 키는 스크린 샷을 참조하십시오.

문서 평균 마지막 5-3


관련 기사 :

Excel에서 5 행 또는 열을 평균화하는 방법은 무엇입니까?

Excel에서 상위 또는 하위 3 개 값을 평균화하는 방법은 무엇입니까?

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
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