{"id":8439,"date":"2024-12-22T14:34:25","date_gmt":"2024-12-22T14:34:25","guid":{"rendered":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/22\/su-dung-phep-toan-logic-de-rut-gon-cong-thuc-if\/"},"modified":"2024-12-22T14:34:25","modified_gmt":"2024-12-22T14:34:25","slug":"su-dung-phep-toan-logic-de-rut-gon-cong-thuc-if","status":"publish","type":"post","link":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/22\/su-dung-phep-toan-logic-de-rut-gon-cong-thuc-if\/","title":{"rendered":"S\u1eed d\u1ee5ng ph\u00e9p to\u00e1n logic \u0111\u1ec3 r\u00fat g\u1ecdn c\u00f4ng th\u1ee9c IF"},"content":{"rendered":"<div class=\"uk-panel uk-margin\" id=\"template-nJy84WMn#1\">\n<p>Gi\u1ea3 s\u1eed b\u1ea1n l\u00e0 m\u1ed9t ng\u01b0\u1eddi b\u00e1n h\u00e0ng, n\u1ebfu doanh s\u1ed1 sales c\u1ee7a b\u1ea1n nhi\u1ec1u h\u01a1n $ 10,000 th\u00ec b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c bonus $ 500, n\u1ebfu nh\u1ecf h\u01a1n th\u00ec b\u1ea1n kh\u00f4ng \u0111\u01b0\u1ee3c bonus. \u0110i\u1ec1u n\u00e0y c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n \u0111\u01a1n gi\u1ea3n trong Excel b\u1eb1ng 1 h\u00e0m IF nh\u01b0 sau:<\/p>\n<p><strong>=IF(sales &gt; 10000, 500, 0)<\/strong><\/p>\n<p>Trong c\u00f4ng th\u1ee9c tr\u00ean: sales l\u00e0 1 name range ch\u1ee9a gi\u00e1 tr\u1ecb sales c\u1ee7a b\u1ea1n. H\u00e0m IF ph\u00eda tr\u00ean c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c vi\u1ebft l\u1ea1i nh\u01b0 sau m\u00e0 v\u1eabn nh\u1eadn \u0111\u01b0\u1ee3c k\u1ebft qu\u1ea3<\/p>\n<p><strong>=(sales &gt; 10000) * 500<\/strong><\/p>\n<h2>T\u1ea1i sao l\u1ea1i nh\u01b0 v\u1eady?<\/h2>\n<p>Trong Excel, gi\u00e1 tr\u1ecb logic c\u1ee7a TRUE khi \u0111\u01b0\u1ee3c nh\u00e2n v\u1edbi 1 s\u1ed1 s\u1ebd \u0111\u01b0\u1ee3c hi\u1ec3u t\u01b0\u01a1ng t\u1ef1 nh\u01b0 s\u1ed1 1 nh\u00e2n v\u1edbi 1 s\u1ed1. Trong tr\u01b0\u1eddng h\u1ee3p n\u00e0y n\u1ebfu m\u1ee9c sales c\u1ee7a b\u1ea1n l\u1edbn h\u01a1n $ 10,000 th\u00ec bi\u1ec3u th\u1ee9c <strong>(sales &gt; 10000)<\/strong> s\u1ebd tr\u1ea3 v\u1ec1 gi\u00e1 tr\u1ecb l\u00e0 TRUE, khi ta l\u1ea5y <strong>TRUE * 500<\/strong> \u0111i\u1ec1u n\u00e0y t\u01b0\u01a1ng \u0111\u01b0\u01a1ng v\u1edbi l\u1ea5y <strong>1 * 500<\/strong>. V\u1eady n\u00ean k\u1ebft qu\u1ea3 \u0111\u00fang nh\u01b0 k\u1ebft qu\u1ea3 c\u1ee7a h\u00e0m IF ph\u00eda tr\u00ean mang l\u1ea1i.<\/p>\n<p>T\u01b0\u01a1ng t\u1ef1 nh\u01b0 v\u1eady v\u1edbi 1 tr\u01b0\u1eddng h\u1ee3p sau \u0111\u00e2y, tr\u01b0\u1eddng h\u1ee3p n\u00e0y thay v\u00ec s\u1eed d\u1ee5ng 2 h\u00e0m IF, th\u00ec b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng logic t\u01b0\u01a1ng t\u1ef1 nh\u01b0 \u0111\u00e3 ph\u00e2n t\u00edch:<\/p>\n<p>\u201cV\u00ed d\u1ee5 2: B\u1ea1n l\u00e0 ng\u01b0\u1eddi b\u00e1n h\u00e0ng, n\u1ebfu doanh s\u1ed1 tr\u00ean $ 10,000 =&gt; bonus $ 500, n\u1ebfu doanh s\u1ed1 &gt; $ 12,000 =&gt; bonus $ 500 + $ 250\u201d<\/p>\n<p>H\u00e3y th\u1eed tr\u1ef1c ti\u1ebfp tr\u00ean file Excel online ph\u00eda d\u01b0\u1edbi v\u00e0 kh\u00e1m ph\u00e1 c\u00e1ch vi\u1ebft c\u00f4ng th\u1ee9c n\u00e0y. C\u1ea3m \u01a1n c\u00e1c b\u1ea1n \u0111\u00e3 \u0111\u1ecdc \u0111\u1ebfn \u0111\u00e2y v\u00e0 \u0111\u1eebng qu\u00ean chia s\u1ebb b\u00e0i vi\u1ebft.<\/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-344.gif\" title=\"vba101_92019-nho-344\"><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-773.gif\" title=\"ex101_92019-nho-773\"><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n\n<p>\u2014<br \/>\nKh\u00e1m ph\u00e1 th\u00eam th\u1eadt nhi\u1ec1u ki\u1ebfn th\u1ee9c v\u1edbi H\u1ecdc Excel Online:<br \/>\n? H\u1ecdc Excel, C\u00f3 Vi\u1ec7c Ngay: <a href=\"http:\/\/bit.ly\/heoEDM01a\">http:\/\/bit.ly\/heoEDM01a<\/a><br \/>\n? L\u1eadp tr\u00ecnh VBA n\u00e2ng cao kh\u1ea3 n\u0103ng Excel: <a href=\"http:\/\/bit.ly\/heoEDM02a\">http:\/\/bit.ly\/heoEDM02a<\/a><br \/>\n? Tr\u1edf th\u00e0nh si\u00eau nh\u00e2n b\u00e1o c\u00e1o v\u00e0 bi\u1ec3u \u0111\u1ed3: <a href=\"http:\/\/bit.ly\/heoEDM05a\">http:\/\/bit.ly\/heoEDM05a<\/a><br \/>\n? Excel t\u1eeb \u0111\u01a1n gi\u1ea3n \u0111\u1ebfn chuy\u00ean gia: <a href=\"http:\/\/bit.ly\/heoEDM06a\">http:\/\/bit.ly\/heoEDM06a<\/a><br \/>\n? H\u00e3y \u0111\u1ec3 Excel 2010 gi\u00fap b\u1ea1n: <a href=\"http:\/\/bit.ly\/heoEDM07a\">http:\/\/bit.ly\/heoEDM07a<\/a><\/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-344.gif\"><br \/>\n<\/a>\n<\/div>\n","protected":false},"author":1,"featured_media":8440,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-8439","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\/8439","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=8439"}],"version-history":[{"count":0,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/8439\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media\/8440"}],"wp:attachment":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media?parent=8439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/categories?post=8439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/tags?post=8439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}