{"id":11519,"date":"2025-01-15T03:53:48","date_gmt":"2025-01-15T03:53:48","guid":{"rendered":"https:\/\/blog.ezworkapp.com\/index.php\/2025\/01\/15\/cach-lay-dia-chi-cua-o-tinh-trong-excel\/"},"modified":"2025-01-15T03:53:48","modified_gmt":"2025-01-15T03:53:48","slug":"cach-lay-dia-chi-cua-o-tinh-trong-excel","status":"publish","type":"post","link":"https:\/\/blog.ezworkapp.com\/index.php\/2025\/01\/15\/cach-lay-dia-chi-cua-o-tinh-trong-excel\/","title":{"rendered":"C\u00e1ch l\u1ea5y \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 t\u00ednh trong Excel"},"content":{"rendered":"<div class=\"uk-panel uk-margin\" id=\"template-nJy84WMn#1\">\n<p style=\"text-align: justify\">Trong b\u00e0i vi\u1ebft n\u00e0y, <a href=\"http:\/\/blog.ezworkapp.com\/\"><strong>H\u1ecdc Excel Online<\/strong><\/a> s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n l\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c v\u00e0 b\u1eb1ng m\u00e3 VBA.<\/p>\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-6787314b40613\" 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-lay-dia-chi-cua-o-tinh-trong-excel.html#Lay_dia_chi_cua_o_tinh_bang_cong_thuc\" title=\"L\u1ea5y \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c\">L\u1ea5y \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c<\/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-lay-dia-chi-cua-o-tinh-trong-excel.html#Lay_dia_chi_o_tinh_bang_cong_thuc_Cell\" title=\"L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c Cell\">L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c Cell<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.hocexcel.online\/cach-lay-dia-chi-cua-o-tinh-trong-excel.html#Lay_dia_chi_o_tinh_bang_VBA_Code\" title=\"L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng VBA Code\">L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng VBA Code<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.hocexcel.online\/cach-lay-dia-chi-cua-o-tinh-trong-excel.html#Hien_thi_dia_chi_o_tinh_trong_mot_o_nhat_dinh_bang_VBA_Code\" title=\"Hi\u1ec3n th\u1ecb \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh trong m\u1ed9t \u00f4 nh\u1ea5t \u0111\u1ecbnh b\u1eb1ng VBA Code\">Hi\u1ec3n th\u1ecb \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh trong m\u1ed9t \u00f4 nh\u1ea5t \u0111\u1ecbnh b\u1eb1ng VBA Code<\/a><\/li>\n<\/ul>\n<\/nav>\n<\/div>\n<h2 style=\"text-align: justify\"><span class=\"ez-toc-section\" id=\"Lay_dia_chi_cua_o_tinh_bang_cong_thuc\"><\/span><strong>L\u1ea5y \u0111\u1ecba ch\u1ec9 c\u1ee7a \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>S\u1eed d\u1ee5ng <a href=\"http:\/\/blog.ezworkapp.com\/gioi-thieu-ham-address-trong-excel.html\"><strong>h\u00e0m Address<\/strong><\/a><\/p>\n<p style=\"text-align: justify\">1. Ch\u1ecdn \u00f4 t\u00ednh b\u1ea1n c\u1ea7n l\u1ea5y \u0111\u1ecba ch\u1ec9.<\/p>\n<p style=\"text-align: justify\">2. Sao ch\u00e9p v\u00e0 d\u00e1n c\u00f4ng th\u1ee9c <em><strong>=ADDRESS(ROW(),COLUMN())\u00a0<\/strong><\/em>v\u00e0o \u00f4 t\u00ednh v\u00e0 nh\u1ea5n Enter.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-1.png\" title=\"doc-get-address-of-active-cell-1\"><\/p>\n<p style=\"text-align: justify\">\u0110\u1ecba ch\u1ec9 \u00f4 t\u00ednh hi\u1ec3n th\u1ecb trong \u00f4 ngay l\u1eadp t\u1ee9c.<\/p>\n<h2 style=\"text-align: justify\"><span class=\"ez-toc-section\" id=\"Lay_dia_chi_o_tinh_bang_cong_thuc_Cell\"><\/span>L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng c\u00f4ng th\u1ee9c Cell<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li style=\"text-align: justify\">Ch\u1ecdn \u00f4 t\u00ednh b\u1ea1n c\u1ea7n l\u1ea5y \u0111\u1ecba ch\u1ec9<\/li>\n<li style=\"text-align: justify\">Nh\u1eadp c\u00f4ng th\u1ee9c\u00a0=CELL(\u201caddress\u201d) r\u1ed3i nh\u1ea5n Enter<\/li>\n<\/ol>\n<h2 style=\"text-align: justify\"><span class=\"ez-toc-section\" id=\"Lay_dia_chi_o_tinh_bang_VBA_Code\"><\/span><strong>L\u1ea5y \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1eb1ng VBA Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify\">1. Nh\u1ea5n gi\u1eef ph\u00edm\u00a0<em><strong>Alt + F11<\/strong><\/em>, c\u1eeda s\u1ed5\u00a0<em><strong>Microsoft Visual Basic for Applications\u00a0<\/strong><\/em>m\u1edf ra.<\/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\/2025\/01\/vba101_92019-nho-47.gif\" title=\"vba101_92019-nho-47\"><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\/2025\/01\/ex101_92019-nho-302.gif\" title=\"ex101_92019-nho-302\"><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p style=\"text-align: justify\">2. Trong c\u1eeda s\u1ed5 <em><strong>Microsoft Visual Basic for Applications<\/strong><\/em>, nh\u1ea5n chu\u1ed9t hai l\u1ea7n v\u00e0o t\u00ean c\u1ee7a trang t\u00ednh \u0111ang s\u1eed d\u1ee5ng trong b\u1ea3ng b\u00ean tr\u00e1i \u0111\u1ec3 m\u1edf ph\u1ea7n ch\u1ec9nh s\u1eeda m\u00e3, sau \u0111\u00f3 sao ch\u00e9p v\u00e0 d\u00e1n \u0111o\u1ea1n m\u00e3 sau:<\/p>\n<div>\n<div id=\"highlighter_425655\" class=\"syntaxhighlighter vb\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"vb keyword\">Sub<\/code><code class=\"vb plain\">selectRange()<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"vb spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"vb plain\">MsgBox ActiveCell.Address<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"vb keyword\">End<\/code><code class=\"vb keyword\">Sub<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-2.png\" title=\"doc-get-address-of-active-cell-2\"><\/p>\n<p style=\"text-align: justify\">3. Nh\u1ea5n n\u00fat\u00a0<em><strong>Run<\/strong><\/em> \u0111\u1ec3 ch\u1ea1y m\u00e3.<\/p>\n<p style=\"text-align: justify\">4. M\u1ed9t h\u1ed9p tho\u1ea1i hi\u1ec7n ra hi\u1ec3n th\u1ecb \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-3.png\" title=\"doc-get-address-of-active-cell-3\"><\/p>\n<h2 style=\"text-align: justify\"><span class=\"ez-toc-section\" id=\"Hien_thi_dia_chi_o_tinh_trong_mot_o_nhat_dinh_bang_VBA_Code\"><\/span><strong>Hi\u1ec3n th\u1ecb \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh trong m\u1ed9t \u00f4 nh\u1ea5t \u0111\u1ecbnh b\u1eb1ng VBA Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify\">Trong tr\u01b0\u1eddng h\u1ee3p kh\u00e1c, b\u1ea1n c\u1ea7n \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh hi\u1ec3n th\u1ecb trong m\u1ed9t \u00f4 t\u00ednh c\u1ee5 th\u1ec3. M\u1ed7i khi b\u1ea1n di chuy\u1ec3n t\u1eeb \u00f4 n\u00e0y sang \u00f4 kh\u00e1c, \u0111\u1ecba ch\u1ec9 \u00f4 t\u00ednh s\u1ebd \u0111\u01b0\u1ee3c t\u1ef1 \u0111\u1ed9ng thay \u0111\u1ed5i v\u00e0 hi\u1ec3n th\u1ecb trong m\u1ed9t \u00f4 nh\u1ea5t \u0111\u1ecbnh.<\/p>\n<p style=\"text-align: justify\">1. Nh\u1ea5n gi\u1eef ph\u00edm\u00a0<em><strong>Alt + F11<\/strong><\/em>, c\u1eeda s\u1ed5\u00a0<em><strong>Microsoft Visual Basic for Applications\u00a0<\/strong><\/em>m\u1edf ra.<\/p>\n<p style=\"text-align: justify\">2. Trong c\u1eeda s\u1ed5\u00a0<em><strong>Microsoft Visual Basic for Applications<\/strong><\/em>, nh\u1ea5n chu\u1ed9t hai l\u1ea7n v\u00e0o t\u00ean c\u1ee7a trang t\u00ednh \u0111ang s\u1eed d\u1ee5ng trong b\u1ea3ng b\u00ean tr\u00e1i \u0111\u1ec3 m\u1edf ph\u1ea7n ch\u1ec9nh s\u1eeda m\u00e3, sau \u0111\u00f3 sao ch\u00e9p v\u00e0 d\u00e1n \u0111o\u1ea1n m\u00e3 sau:<\/p>\n<div class=\"line number1 index0 alt2\"><code class=\"vb keyword\">Private<\/code><code class=\"vb keyword\">Sub<\/code><code class=\"vb plain\">Worksheet_SelectionChange(<\/code><code class=\"vb keyword\">ByVal<\/code><code class=\"vb plain\">Target\u00a0<\/code><code class=\"vb keyword\">As<\/code><code class=\"vb plain\">Range)<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"vb spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"vb plain\">Range(<\/code><code class=\"vb string\">\"A1\"<\/code><code class=\"vb plain\">).Value = ActiveCell.Address<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"vb keyword\">End<\/code><code class=\"vb keyword\">Sub<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n<\/div>\n<div class=\"line number3 index2 alt2\"><strong>Ch\u00fa \u00fd.\u00a0<\/strong>A1 l\u00e0 \u00f4 t\u00ednh b\u1ea1n mu\u1ed1n hi\u1ec3n th\u1ecb \u0111\u1ecba ch\u1ec9 \u00f4, b\u1ea1n c\u00f3 th\u1ec3 thay \u0111\u1ed5i th\u00e0nh \u00f4 kh\u00e1c t\u00f9y \u00fd.<\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7521\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-4.png\" width=\"600\" height=\"152\" title=\"doc-get-address-of-active-cell-4\"><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: justify\">3. Nh\u1ea5p <em><strong>File\u00a0&gt;\u00a0Close and Return to Microsoft Excel\u00a0<\/strong><\/em>\u0111\u1ec3 \u0111\u00f3ng c\u1eeda s\u1ed5 <em><strong>Microsoft Visual Basic for Applications<\/strong><\/em>.<\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-5.png\" title=\"doc-get-address-of-active-cell-5\"><\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: justify\">\u0110\u1ecba ch\u1ec9 \u00f4 t\u00ednh b\u1ea1n c\u1ea7n hi\u1ec3n th\u1ecb trong \u00f4 A1, v\u00e0 n\u00f3 s\u1ebd t\u1ef1 \u0111\u1ed9ng thay \u0111\u1ed5i khi b\u1ea1n di chuy\u1ec3n sang \u00f4 t\u00ednh kh\u00e1c.<\/div>\n<div class=\"line number3 index2 alt2\" style=\"text-align: center\"><img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2025\/01\/doc-get-address-of-active-cell-6.png\" title=\"doc-get-address-of-active-cell-6\"><\/div>\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\/2025\/01\/vba101_92019-nho-47.gif\"><br \/>\n<\/a>\n<\/div>\n","protected":false},"author":1,"featured_media":11520,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-11519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-co-ban"],"_links":{"self":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/11519","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=11519"}],"version-history":[{"count":0,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/11519\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media\/11520"}],"wp:attachment":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media?parent=11519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/categories?post=11519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/tags?post=11519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}