{"id":15893,"date":"2024-11-14T01:31:35","date_gmt":"2024-11-13T16:31:35","guid":{"rendered":"https:\/\/84office.jp\/?p=15893"},"modified":"2024-11-15T01:54:33","modified_gmt":"2024-11-14T16:54:33","slug":"spreadsheet-tab-move","status":"publish","type":"post","link":"https:\/\/84office.jp\/en\/spreadsheet-tab-move\/","title":{"rendered":"Enhance Productivity with Google Apps Script: Instantly Rearrange Google Sheets Tabs Right to Left"},"content":{"rendered":"<div class=\"codoc-evacuations\" style=\"display:none;\" data-shortcode=\"\"><\/div>\n\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-small_ttl u-mb-ctrl u-mb-50\" data-colset=\"col3\"><div class=\"cap_box_ttl\" data-has-icon=\"1\"><svg height=\"1em\" width=\"1em\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" viewBox=\"0 0 48 48\"><path d=\"M32 46.5H16c-1.1 0-2-.9-2-2s.9-2 2-2h16c1.1 0 2 .9 2 2s-.9 2-2 2zM33.3 18.6c-.7 0-1.3-.5-1.5-1.2-.7-3.2-3.2-5.7-6.4-6.3-.8-.1-1.4-.9-1.2-1.7s.9-1.4 1.7-1.2c4.4.8 8 4.2 8.9 8.6.2.8-.4 1.6-1.2 1.8h-.3z\"><\/path><path d=\"M30 40.5H18c-2.2 0-4-1.8-4-4v-1.6c0-.6-.3-1.1-.8-1.5C8.4 29.8 5.7 24 6 18c.5-9.1 8-16.6 17.1-17C29 .8 34.5 3.2 38.2 8c1.8 2.3 3 5.1 3.5 7.9 1.1 6.8-1.5 13.3-6.9 17.4-.6.4-.9 1-.9 1.7v1.5c.1 2.2-1.7 4-3.9 4zM23.3 5c-7.1.3-12.9 6.2-13.3 13.2-.2 4.7 1.8 9.1 5.6 11.9 1.5 1.1 2.4 2.9 2.4 4.7v.6c0 .6.4 1 1 1h10c.6 0 1-.4 1-1V35c0-1.9.9-3.7 2.5-4.8 4.3-3.2 6.3-8.5 5.3-13.9-.4-2-1.2-3.8-2.4-5.4-3-4-7.4-6.1-12.1-5.9z\"><\/path><\/svg><span>Recommended for:<\/span><\/div><div class=\"cap_box_content\">\n<p><strong>For those considering improving googlesheets efficiency<\/strong>.<\/p>\n\n\n\n<p><strong>Those with many sheet tabs in one file.<\/strong><\/p>\n<\/div><\/div>\n\n\n\n<p>Google Sheets is a very convenient tool, but a troublesome aspect is moving sheet tabs. <\/p>\n\n\n\n<p>When there are many tabs, the basic method of moving them one by one can be time-consuming, especially when you want to move a tab from the far right to the far left. In such cases, you can use Google Apps Script to move them all at once. <\/p>\n\n\n\n<p>If you need to repeatedly move sheet tabs to the far left, using Google Apps Script can make the process easier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">The script to move the selected sheet tab to the far left<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-40\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Move the selected sheet tab to the far left\nfunction moveActiveSheetToLeft() {\n  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n  var activeSheet = spreadsheet.getActiveSheet();\n  spreadsheet.moveActiveSheet(1);\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88846F\">\/\/ Move the selected sheet tab to the far left<\/span><\/span>\n<span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">moveActiveSheetToLeft<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> spreadsheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> activeSheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getActiveSheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  spreadsheet.<\/span><span style=\"color: #A6E22E\">moveActiveSheet<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Here is the script to move the selected sheet tab to the far left.<\/p>\n\n\n\n<p>You can easily copy the script by clicking the copy icon in the top right corner of the code block.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-50\">You can copy and use the script as it is.<\/p>\n\n\n\n<p class=\"is-style-icon_pen u-mb-ctrl u-mb-60\">The number in the fourth line of &#8216;moveActiveSheet(1)&#8217; determines to which position the sheet will be moved. For example, if you want to move the sheet to the third position, change it to (3).<\/p>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">Script to move the selected sheet tab to the far right<\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-50\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Move the selected sheet tab to the far right\nfunction moveActiveSheetToRight() {\n  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n  var totalSheets = spreadsheet.getNumSheets();\n  var activeSheet = spreadsheet.getActiveSheet();\n  spreadsheet.moveActiveSheet(totalSheets);\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88846F\">\/\/ Move the selected sheet tab to the far right<\/span><\/span>\n<span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">moveActiveSheetToRight<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> spreadsheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> totalSheets <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getNumSheets<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> activeSheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getActiveSheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  spreadsheet.<\/span><span style=\"color: #A6E22E\">moveActiveSheet<\/span><span style=\"color: #F8F8F2\">(totalSheets);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Here&#8217;s the script for moving the selected sheet to the far right, opposite to what we did earlier. <\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-60\">You can copy and use it as is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">How to Use the Script<\/h2>\n\n\n\n<div class=\"swell-block-capbox cap_box u-mb-ctrl u-mb-50\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f7f\u7528\u65b9\u6cd5<\/span><\/div><div class=\"cap_box_content\">\n<ol class=\"wp-block-list is-style-num_circle\">\n<li>Toolbar &#8211; Extensions &#8211; Apps Script<\/li>\n\n\n\n<li>Paste the script<\/li>\n\n\n\n<li>Save the script<\/li>\n\n\n\n<li>Run<\/li>\n\n\n\n<li>The selected sheet tab moves to the left (right).<\/li>\n<\/ol>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Select &#8216;Extensions &#8211; Apps Script&#8217; from the toolbar.<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full\"><a href=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f.jpg\"><img decoding=\"async\" width=\"1590\" height=\"640\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f.jpg\" alt=\"\" class=\"wp-image-15933\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f.jpg 1590w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f-300x121.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f-1024x412.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f-768x309.jpg 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b609cfe16438367ae01c3fe7aa5a722f-1536x618.jpg 1536w\" sizes=\"(max-width: 1590px) 100vw, 1590px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Open the spreadsheet, then click on &#8220;<strong>Extensions<\/strong>&#8221; in the toolbar and select &#8220;<strong>Apps Script<\/strong>.&#8221;<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Paste the script.<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"443\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc-1024x443.jpg\" alt=\"\" class=\"wp-image-15934\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc-1024x443.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc-300x130.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc-768x332.jpg 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc-1536x664.jpg 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/d54248391afff18f9e7b4ef523fdefcc.jpg 1577w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Since `function myFunction(){}` is already there at the beginning, delete it and paste the above script.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Press &#8220;Save Project&#8221;<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-60\">\n<figure class=\"alignleft size-full\"><a href=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1.jpg\"><img decoding=\"async\" width=\"1497\" height=\"626\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1.jpg\" alt=\"\" class=\"wp-image-15936\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1.jpg 1497w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1-300x125.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1-1024x428.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/8a5bfba82bec77752e513a577ea3391a-1-768x321.jpg 768w\" sizes=\"(max-width: 1497px) 100vw, 1497px\" \/><\/a><\/figure>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>Press &#8220;Run.&#8221;<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-60\">\n<figure class=\"alignleft size-full\"><a href=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749.jpg\"><img decoding=\"async\" width=\"1497\" height=\"626\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749.jpg\" alt=\"\" class=\"wp-image-15937\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749.jpg 1497w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749-300x125.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749-1024x428.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/72dce2e59d9787a79d370256e014f749-768x321.jpg 768w\" sizes=\"(max-width: 1497px) 100vw, 1497px\" \/><\/a><\/figure>\n<\/div>\n\n\n<div class=\"wp-block-group is-style-big_icon_memo u-mb-ctrl u-mb-60\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>If you&#8217;re running the script for the first time, you need to authorize it. <\/p>\n\n\n\n<p>Therefore, press &#8220;<strong>Review Permissions.<\/strong>&#8220;<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"882\" height=\"345\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png\" alt=\"\" class=\"wp-image-15938\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png 882w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-300x117.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-768x300.png 768w\" sizes=\"(max-width: 882px) 100vw, 882px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>Next, press &#8220;Advanced.&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"1272\" height=\"688\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg\" alt=\"\" class=\"wp-image-15939\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg 1272w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-300x162.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-1024x554.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-768x415.jpg 768w\" sizes=\"(max-width: 1272px) 100vw, 1272px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>Press &#8220;Go to Untitled project (Unsafe).&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"1305\" height=\"893\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg\" alt=\"\" class=\"wp-image-15940\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg 1305w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-300x205.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-1024x701.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-768x526.jpg 768w\" sizes=\"(max-width: 1305px) 100vw, 1305px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>After that, press &#8220;Allow.&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"955\" height=\"543\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg\" alt=\"\" class=\"wp-image-15941\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg 955w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-300x171.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-768x437.jpg 768w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/figure>\n<\/div>\n\n\n\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\"><strong>When executed, the selected sheet tab moves to the far left.<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"298\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-80-1024x298.png\" alt=\"\" class=\"wp-image-15942\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-80-1024x298.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-80-300x87.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-80-768x224.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-80.png 1386w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>In the image above, &#8220;Sheet 5&#8221; has moved to the far left.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-60\">If there are only a few sheets, you can move them easily without using Apps Script, but when there are many, using Apps Script can save you time.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">Basic Method for Moving Sheet Tabs (Without Using Google Apps Script)<\/h2>\n\n\n\n<p class=\"has-border -border02 u-mb-ctrl u-mb-50 has-swl-pale-03-background-color has-background\"><strong>Drag &amp; Drop<br>Right-click Menu<\/strong><\/p>\n\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong><strong>Drag &amp; Drop<\/strong><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ol class=\"wp-block-list\">\n<li>Hover the cursor over the sheet tab you want to move.<\/li>\n\n\n\n<li>Click and hold the sheet tab with the mouse.<\/li>\n\n\n\n<li>Drag the sheet tab all the way to the left.<\/li>\n\n\n\n<li>Release the sheet tab.<\/li>\n<\/ol>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Right-click Menu<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ol class=\"wp-block-list\">\n<li>Right-click on the sheet tab you want to move.<\/li>\n\n\n\n<li>Select &#8220;Move left&#8221; from the menu that appears.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n<\/dd>\n<\/dl>\n\n\n\n<p class=\"u-mb-ctrl u-mb-60\">When there are only a few sheet tabs, using drag and drop is an easy way to move them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list has-border -border02 u-mb-ctrl u-mb-60 has-swl-pale-03-background-color has-background\">\n<li>When there are many sheet tabs, it&#8217;s easier to use Google Apps Script to move them to the far left.<\/li>\n\n\n\n<li>If there are only a few sheet tabs, it&#8217;s quicker to move them with drag and drop.<\/li>\n<\/ul>\n\n\n\n<p>Move the sheet tab to the far left.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-60\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Move the selected sheet tab to the far left\nfunction moveActiveSheetToLeft() {\n  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n  var activeSheet = spreadsheet.getActiveSheet();\n  spreadsheet.moveActiveSheet(1);\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88846F\">\/\/ Move the selected sheet tab to the far left<\/span><\/span>\n<span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">moveActiveSheetToLeft<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> spreadsheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> activeSheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getActiveSheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  spreadsheet.<\/span><span style=\"color: #A6E22E\">moveActiveSheet<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u30b7\u30fc\u30c8\u30bf\u30d6\u3092\u53f3\u7aef\u306b\u79fb\u52d5\u3055\u305b\u308b<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-60\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Move the selected sheet tab to the far right\nfunction moveActiveSheetToRight() {\n  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n  var totalSheets = spreadsheet.getNumSheets();\n  var activeSheet = spreadsheet.getActiveSheet();\n  spreadsheet.moveActiveSheet(totalSheets);\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88846F\">\/\/ Move the selected sheet tab to the far right<\/span><\/span>\n<span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">moveActiveSheetToRight<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> spreadsheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> totalSheets <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getNumSheets<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> activeSheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> spreadsheet.<\/span><span style=\"color: #A6E22E\">getActiveSheet<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  spreadsheet.<\/span><span style=\"color: #A6E22E\">moveActiveSheet<\/span><span style=\"color: #F8F8F2\">(totalSheets);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Please use this function when you have many sheet tabs.<\/p>\n\n\n\n\n\n\n<div class=\"p-postListWrap u-mb-ctrl u-mb-20\"><ul class=\"p-postList -type-card -pc-col3 -sp-col1\"><li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/calendar-schedule-get\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/681ab5717fcc05ebbd5941615d6f2bc4-1024x538.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/681ab5717fcc05ebbd5941615d6f2bc4-1024x538.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/681ab5717fcc05ebbd5941615d6f2bc4-300x158.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/681ab5717fcc05ebbd5941615d6f2bc4-768x403.jpg 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/07\/681ab5717fcc05ebbd5941615d6f2bc4.jpg 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">Export Google Calendar Events to a Spreadsheet\uff5cEasily Get Schedules for Multiple Users with Google Apps Script<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2025-07-22\" aria-label=\"\u516c\u958b\u65e5\">2025\u5e747\u670822\u65e5<\/time><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/gas-pop-up\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-1024x538.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-1024x538.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-300x158.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac.png 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">Enhance User Interaction with Google Apps Script: How to Add Confirmation Pop-Ups to Prevent Mistakes<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2024-12-31\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7412\u670831\u65e5<\/time><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/gas-youtube-data-acquisition\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/ac181f5e36f9e3250cb7fb86a7dc9f03-1024x538.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/ac181f5e36f9e3250cb7fb86a7dc9f03-1024x538.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/ac181f5e36f9e3250cb7fb86a7dc9f03-300x158.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/ac181f5e36f9e3250cb7fb86a7dc9f03-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/ac181f5e36f9e3250cb7fb86a7dc9f03.png 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">How to Use the YouTube API to Fetch Video Data in Google Sheets: Automate with Google Apps Script!<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2024-12-21\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7412\u670821\u65e5<\/time><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<\/a>\n<\/li>\n<\/ul><\/div>\n\n\n<p class=\"is-style-emboss_box has-swl-pale-02-background-color has-background\">Our company offers support for improving work efficiency through the use of Google Apps Script. <br>If you need assistance with Google Apps Script customization or error resolution, please feel free to contact us. <br>We are fully committed to supporting your business improvements.<br><br><a href=\"https:\/\/84office.jp\/contact\/\">Contact us here<br><\/a><\/p>\n\n\n\n\n\n\n\n<script src=\"https:\/\/codoc.jp\/js\/cms.js\" data-css=\"rainbow\" data-usercode=\"pQLZofrBiA\" charset=\"UTF-8\" defer><\/script>\n <div id=\"codoc-entry-9lNr9PuMXQ\" class=\"codoc-entries\" data-without-body=\"1\" data-support-button-text=\"Support with a Tip\" data-support-message=\"We will keep offering tools and information to boost work efficiency. Your support helps us provide even better content.\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Google Sheets is a very convenient tool, but a troublesome aspect is moving sheet tabs. When there are many ta [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":15948,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_locale":"en_US","_original_post":"https:\/\/bridgeroad84.com\/?p=14256","footnotes":""},"categories":[12],"tags":[],"class_list":["post-15893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12","en-US"],"_links":{"self":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/15893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/comments?post=15893"}],"version-history":[{"count":8,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/15893\/revisions"}],"predecessor-version":[{"id":15988,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/15893\/revisions\/15988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media\/15948"}],"wp:attachment":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media?parent=15893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/categories?post=15893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/tags?post=15893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}