{"id":5357,"date":"2024-12-15T23:26:37","date_gmt":"2024-12-15T23:26:37","guid":{"rendered":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/15\/cach-tinh-trung-binh-cua-mot-so-theo-tung-lan\/"},"modified":"2024-12-15T23:26:37","modified_gmt":"2024-12-15T23:26:37","slug":"cach-tinh-trung-binh-cua-mot-so-theo-tung-lan","status":"publish","type":"post","link":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/15\/cach-tinh-trung-binh-cua-mot-so-theo-tung-lan\/","title":{"rendered":"C\u00e1ch t\u00ednh trung b\u00ecnh c\u1ee7a m\u1ed9t s\u1ed1 theo t\u1eebng l\u1ea7n"},"content":{"rendered":"<div class=\"uk-panel uk-margin\" id=\"template-nJy84WMn#1\">\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_61 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\">Xem nhanh<\/p>\n<p><label for=\"ez-toc-cssicon-toggle-item-675f65acdba7a\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><\/span><\/span><\/label><\/p>\n<nav>\n<ul class=\"ez-toc-list ez-toc-list-level-1 \">\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.hocexcel.online\/cach-tinh-trung-binh-cua-mot-theo-tung-lan.html#1_Dat_van_de\" title=\"1.\u00a0\u0110\u1eb7t v\u1ea5n\u00a0\u0111\u1ec1\">1.\u00a0\u0110\u1eb7t v\u1ea5n\u00a0\u0111\u1ec1<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.hocexcel.online\/cach-tinh-trung-binh-cua-mot-theo-tung-lan.html#2_Cach_giai_quyet\" title=\"2. C\u00e1ch gi\u1ea3i quy\u1ebft\">2. C\u00e1ch gi\u1ea3i quy\u1ebft<\/a>\n<ul class=\"ez-toc-list-level-3\">\n<li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.hocexcel.online\/cach-tinh-trung-binh-cua-mot-theo-tung-lan.html#21_Bu_tru_phan_thieu_vao_lan_cuoi\" title=\"2.1. B\u00f9 tr\u1eeb ph\u1ea7n thi\u1ebfu v\u00e0o l\u1ea7n\u00a0cu\u1ed1i\">2.1. B\u00f9 tr\u1eeb ph\u1ea7n thi\u1ebfu v\u00e0o l\u1ea7n\u00a0cu\u1ed1i<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.hocexcel.online\/cach-tinh-trung-binh-cua-mot-theo-tung-lan.html#22_Cach_tinh_trung_binh_sau_moi_lan_thanh_toan\" title=\"2.2. C\u00e1ch t\u00ednh trung b\u00ecnh sau m\u1ed7i l\u1ea7n thanh to\u00e1n\">2.2. C\u00e1ch t\u00ednh trung b\u00ecnh sau m\u1ed7i l\u1ea7n thanh to\u00e1n<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/nav>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"1_Dat_van_de\"><\/span>1.\u00a0\u0110\u1eb7t v\u1ea5n\u00a0\u0111\u1ec1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Th\u00f4ng th\u01b0\u1eddng b\u1ea1n v\u1eabn hi\u1ec3u r\u1eb1ng mu\u1ed1n t\u00ednh trung\u00a0 b\u00ecnh c\u1ee7a 1 s\u1ed1 th\u00ec s\u1ebd l\u1ea5y s\u1ed1 \u0111\u00f3 chia cho t\u1ed5ng s\u1ed1 l\u1ea7n. Th\u1ebf nh\u01b0ng n\u1ebfu nh\u01b0 vi\u1ec7c chia t\u1eebng l\u1ea7n\u00a0\u0111\u00f3 g\u00e2y ra s\u1ed1 l\u1ebb th\u00ec sao? ho\u1eb7c n\u1ebfu ch\u00fang ta bu\u1ed9c ph\u1ea3i l\u00e0m tr\u00f2n s\u1ed1 trung b\u00ecnh c\u1ee7a t\u1eebng l\u1ea7n th\u00ec li\u1ec7u vi\u1ec7c l\u00e0m tr\u00f2n\u00a0\u0111\u00f3 c\u00f2n ch\u00ednh x\u00e1c hay kh\u00f4ng?<\/p>\n<p>X\u00e9t v\u00ed d\u1ee5 sau:<\/p>\n<p>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14495\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/heo-tb-tung-lan-02.png\" width=\"502\" height=\"447\" title=\"heo-tb-tung-lan-02\"><\/p>\n<p>V\u00ed d\u1ee5 ch\u00fang ta mu\u1ed1n thanh to\u00e1n 1 kho\u1ea3n ti\u1ec1n l\u00e0 14.654.000 theo 6\u00a0\u0111\u1ee3t (6 l\u1ea7n), v\u1eady ch\u00fang ta s\u1ebd t\u00ednh l\u00e0:<\/p>\n<p>14.654.000 \/ 6 =\u00a02.442.333,33333333<\/p>\n<p>h\u1eb3n b\u1ea1n kh\u00f4ng mu\u1ed1n t\u00ednh l\u1ebb t\u1edbi nh\u01b0 v\u1eady, do\u00a0\u0111\u00f3 b\u1ea1n mu\u1ed1n l\u00e0m tr\u00f2n t\u1edbi h\u00e0ng ngh\u00ecn cho d\u1ec5 tr\u1ea3<\/p>\n<div class=\"code-block code-block-2\" style=\"margin: 8px 0;clear: both\">\n<div class=\"ad-inserterpro\">\n<a href=\"https:\/\/hocexcel.online\/course\/preview\/vba101-tu-dong-hoa-excel-voi-lap-trinh-vba-cho-nguoi-moi-bat-dau\"><br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/vba101_92019-nho-186.gif\" title=\"vba101_92019-nho-186\"><br \/>\n<\/a>\n<\/div>\n<\/div>\n<div class=\"code-block code-block-1\" style=\"margin: 8px 0;clear: both\">\n<div class=\"ad-inserterpro\">\n<a href=\"https:\/\/hocexcel.online\/course\/preview\/ex101-excel-tu-co-ban-den-chuyen-gia-danh-cho-nguoi-di-lam\"><br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/ex101_92019-nho-461.gif\" title=\"ex101_92019-nho-461\"><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p>=&gt; Theo nguy\u00ean t\u1eafc l\u00e0m tr\u00f2n th\u00ec s\u1ed1 2.442.333,3333 s\u1ebd l\u00e0m tr\u00f2n th\u00e0nh 2.442.000<\/p>\n<p>(H\u00e0m ROUND(S\u1ed1 c\u1ea7n l\u00e0m tr\u00f2n, -3)<\/p>\n<p>Nh\u01b0 v\u1eady ph\u1ea7n s\u1ed1 l\u1ebb s\u1ebd b\u1ecb thi\u1ebfu, do\u00a0\u0111\u00f3 l\u00e0m t\u1ed5ng s\u1ed1 ti\u1ec1n c\u1ee7a 6\u00a0\u0111\u1ee3t s\u1ebd c\u00f2n 14.652.000 =&gt; K\u1ebft qu\u1ea3 kh\u00f4ng\u00a0\u0111\u00fang<\/p>\n<p>Sai l\u1ec7ch s\u1ebd tr\u1edf n\u00ean l\u1edbn h\u01a1n nhi\u1ec1u v\u1edbi vi\u1ec7c chia th\u00e0nh nhi\u1ec1u l\u1ea7n thanh to\u00e1n h\u01a1n.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_Cach_giai_quyet\"><\/span>2. C\u00e1ch gi\u1ea3i quy\u1ebft<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"21_Bu_tru_phan_thieu_vao_lan_cuoi\"><\/span>2.1. B\u00f9 tr\u1eeb ph\u1ea7n thi\u1ebfu v\u00e0o l\u1ea7n\u00a0cu\u1ed1i<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14496\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/heo-tb-tung-lan-03.png\" width=\"607\" height=\"454\" title=\"heo-tb-tung-lan-03\"><\/p>\n<p>Quy\u00a0\u0111\u1ecbnh s\u1eb5n t\u1ed5ng s\u1ed1 c\u1ea7n ph\u1ea3i thanh to\u00e1n lu\u00f4n lu\u00f4n b\u1eb1ng v\u1edbi s\u1ed1 n\u1ee3 ban\u00a0\u0111\u1ea7u n\u00ean D11 = C1<\/p>\n<p>T\u1ea1i c\u00e1c l\u1ea7n thanh to\u00e1n t\u1eeb 1\u00a0\u0111\u1ebfn 5 th\u00ec t\u00ednh trung b\u00ecnh nh\u01b0 th\u00f4ng th\u01b0\u1eddng<\/p>\n<p>T\u1ea1i l\u1ea7n thanh to\u00e1n cu\u1ed1i (l\u1ea7n th\u1ee9 6) th\u00ec s\u1ebd b\u1eb1ng T\u1ed5ng s\u1ed1 ph\u1ea3i thanh to\u00e1n \u2013 T\u1ed5ng nh\u1eefng l\u1ea7n thanh to\u00e1n tr\u01b0\u1edbc\u00a0\u0111\u00f3<\/p>\n<p>D10 = D11 \u2013 SUM(D5:D9)<\/p>\n<p>Nh\u01b0 v\u1eady v\u1edbi c\u00e1ch n\u00e0y to\u00e0n b\u1ed9 ph\u1ea7n sai l\u1ec7ch do l\u00e0m tr\u00f2n\u00a0\u1edf nh\u1eefng l\u1ea7n tr\u01b0\u1edbc\u00a0\u0111\u00f3 s\u1ebd\u00a0\u0111\u01b0\u1ee3c c\u1ed9ng v\u00e0o l\u1ea7n cu\u1ed1i c\u00f9ng.<\/p>\n<p><strong>\u01afu\u00a0\u0111i\u1ec3m:<\/strong><\/p>\n<p>\u0110\u1ea3m b\u1ea3o k\u1ebft qu\u1ea3 cu\u1ed1i c\u00f9ng lu\u00f4n\u00a0\u0111\u00fang<\/p>\n<p><strong>Nh\u01b0\u1ee3c\u00a0\u0111i\u1ec3m<\/strong><\/p>\n<p>Kh\u00f4ng\u00a0\u0111\u1ed3ng\u00a0\u0111\u1ec1u gi\u1eefa c\u00e1c l\u1ea7n. T\u1ea1i l\u1ea7n cu\u1ed1i c\u00f3 th\u1ec3 ph\u00e1t\u00a0 sinh l\u1edbn h\u01a1n h\u1eb3n so v\u1edbi c\u00e1c l\u1ea7n tr\u01b0\u1edbc\u00a0\u0111\u00f3.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"22_Cach_tinh_trung_binh_sau_moi_lan_thanh_toan\"><\/span>2.2. C\u00e1ch t\u00ednh trung b\u00ecnh sau m\u1ed7i l\u1ea7n thanh to\u00e1n<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0110\u1ec3 kh\u1eafc ph\u1ee5c nh\u01b0\u1ee3c\u00a0\u0111i\u1ec3m c\u1ee7a c\u00e1ch tr\u00ean, ch\u00fang ta t\u00ecm hi\u1ec3u v\u1ec1 c\u00e1ch t\u00ednh trung b\u00ecnh sau m\u1ed7i l\u1ea7n thanh to\u00e1n.<\/p>\n<p>C\u00e1ch n\u00e0y\u00a0\u0111\u01b0\u1ee3c hi\u1ec3u nh\u01b0 sau:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14497\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/heo-tb-tung-lan-04.png\" width=\"995\" height=\"445\" title=\"heo-tb-tung-lan-04\"><\/p>\n<p>T\u1ea1i m\u1ed7i l\u1ea7n thanh to\u00e1n, s\u1ed1 ph\u1ea3i thanh to\u00e1n = S\u1ed1 ti\u1ec1n c\u00f2n l\u1ea1i ch\u01b0a thanh to\u00e1n \/ S\u1ed1 l\u1ea7n\u00a0 c\u00f2n ph\u1ea3i thanh to\u00e1n<\/p>\n<p>S\u1ed1 ti\u1ec1n c\u00f2n l\u1ea1i ch\u01b0a\u00a0 thanh to\u00e1n = S\u1ed1 ti\u1ec1n ban\u00a0\u0111\u1ea7u \u2013 S\u1ed1\u00a0\u0111\u00e3 thanh to\u00e1n\u00a0\u1edf nh\u1eefng l\u1ea7n tr\u01b0\u1edbc\u00a0\u0111\u00f3<\/p>\n<p>S\u1ed1 ti\u1ec1n ban\u00a0\u0111\u1ea7u = C1<\/p>\n<p>S\u1ed1 ti\u1ec1n\u00a0\u0111\u00e3 thanh to\u00e1n\u00a0\u1edf nh\u1eefng l\u1ea7n tr\u01b0\u1edbc\u00a0\u0111\u00f3:<\/p>\n<ul>\n<li>L\u1ea7n 1: Sum(E4:E4) l\u00e0 l\u1ea7n 0<\/li>\n<li>L\u1ea7n 2: Sum(E4:E5) l\u00e0 c\u1ee7a l\u1ea7n 0 + l\u1ea7n 1<\/li>\n<li>L\u1ea7n 3: Sum(E4:E6) l\u00e0 c\u1ee7a L\u1ea7n 0 + l\u1ea7n 1 + l\u1ea7n 2<\/li>\n<li>t\u01b0\u01a1ng t\u1ef1 cho nh\u1eefng l\u1ea7n ti\u1ebfp theo<\/li>\n<\/ul>\n<p>Khi\u00a0\u0111\u00f3 ta c\u00f3 th\u1ec3 th\u1ea5y\u00a0\u00f4 E4 lu\u00f4n xu\u1ea5t hi\u1ec7n trong c\u00f4ng th\u1ee9c t\u00ednh t\u1ed5ng =&gt; C\u1ed1\u00a0\u0111\u1ecbnh\u00a0\u0111i\u1ec3m E4<\/p>\n<p>S\u1ed1 l\u1ea7n c\u00f2n ph\u1ea3i thanh to\u00e1n =\u00a0\u0110\u1ebfm s\u1ed1 d\u00f2ng c\u1ee7a c\u00e1c l\u1ea7n\u00a0 c\u00f2n l\u1ea1i. S\u1eed d\u1ee5ng h\u00e0m ROWS\u00a0\u0111\u1ec3\u00a0\u0111\u1ebfm c\u1ed9t L\u1ea7n thanh to\u00e1n, t\u1eeb l\u1ea7n th\u1ef1c hi\u1ec7n\u00a0\u0111\u1ebfn l\u1ea7n 6 =&gt; khi\u00a0\u0111\u00f3\u00a0\u00f4 B10 lu\u00f4n xu\u1ea5t hi\u1ec7n trong c\u00e1c c\u00f4ng th\u1ee9c ROWS =&gt; C\u1ed1\u00a0\u0111\u1ecbnh\u00a0\u0111i\u1ec3m B10<\/p>\n<p>\u0110\u1ec3 l\u00e0m tr\u00f2n s\u1ed1 =&gt;\u00a0\u0110\u1eb7t\u00a0 to\u00e0n b\u1ed9 c\u00f4ng th\u1ee9c trong h\u00e0m ROUND<\/p>\n<p>Nh\u01b0 v\u1eady ch\u00fang ta c\u00f3 th\u1ec3 th\u1ea5y k\u1ebft qu\u1ea3\u00a0\u0111\u00e3 d\u1ed3n nh\u1eefng ph\u1ea7n sai l\u1ec7ch do l\u00e0m tr\u00f2n ngay th\u1eddi\u00a0\u0111i\u1ec3m s\u1ed1 sai l\u1ec7ch v\u1eeba\u00a0\u0111\u1ee7\u00a0\u0111\u1ec3 th\u00e0nh 1 s\u1ed1 nguy\u00ean (\u1edf\u00a0\u00f4 E7 v\u00e0 E9) =&gt; K\u1ebft qu\u1ea3 ch\u00ednh x\u00e1c h\u01a1n t\u1ea1i c\u00e1c l\u1ea7n.<\/p>\n<p>T\u1ea3i v\u1ec1 file m\u1eabu: <a href=\"http:\/\/bit.ly\/2GwHIkQ\">http:\/\/bit.ly\/2GwHIkQ<\/a><\/p>\n<p>Ch\u00fac c\u00e1c b\u1ea1n h\u1ecdc t\u1ed1t c\u00f9ng H\u1ecdc\u00a0Excel Online!<\/p>\n<\/div>\n<div class=\"uk-panel uk-margin uk-width-xlarge\">\n<p>Click \u0111\u0103ng k\u00fd h\u1ecdc t\u1ea1i:<\/p>\n<p><a href=\"http:\/\/blog.ezworkapp.com\/khoa-hoc\" target=\"_blank\" rel=\"noopener\">T\u1ea5t c\u1ea3 kho\u00e1 h\u1ecdc\u00a0<span>\ud83d\udcd6<\/span><\/a><\/p>\n<p><a href=\"http:\/\/blog.ezworkapp.com\/huong-dan-kich-hoat-khoa-hoc-tai-hoc-excel-online.html\" target=\"_blank\" rel=\"noopener\">H\u01b0\u1edbng d\u1eabn k\u00edch ho\u1ea1t<\/a><\/p>\n<p>HKD H\u1ecdc Excel Online<br \/>S\u1ed1 \u0110K: 17A80048102<\/p>\n<\/div>\n<div class=\"uk-panel uk-text-small uk-margin uk-margin-remove-bottom uk-text-center\">\n<p>\u00a9  document.currentScript.insertAdjacentHTML(&#8216;afterend&#8217;, &#8221; + new Intl.DateTimeFormat(document.documentElement.lang, {year: &#8216;numeric&#8217;}).format() + &#8221;);  H\u1ecdc Excel Online. All rights reserved.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"ad-inserterpro\">\n<a href=\"https:\/\/hocexcel.online\/course\/preview\/vba101-tu-dong-hoa-excel-voi-lap-trinh-vba-cho-nguoi-moi-bat-dau\"><br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/vba101_92019-nho-186.gif\"><br \/>\n<\/a>\n<\/div>\n","protected":false},"author":1,"featured_media":5358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-5357","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-nang-cao"],"_links":{"self":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/5357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/comments?post=5357"}],"version-history":[{"count":0,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/5357\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media\/5358"}],"wp:attachment":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media?parent=5357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/categories?post=5357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/tags?post=5357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}