Excel https://notes.masterweb.sk/ sk Remove many hidden excel columns with VBA (macro) https://notes.masterweb.sk/excel/remove-many-hidden-excel-columns-vba-macro <span class="field field--name-title field--type-string field--label-hidden">Remove many hidden excel columns with VBA (macro)</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">ROOT</span></span> <span class="field field--name-created field--type-created field--label-hidden">St, 11/12/2025 - 14:08</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Complete Instructions</h2> <h3><strong>Step 1: Open VBA Editor</strong></h3> <ol> <li>Press <code data-gramm="false">Alt + F11</code> (opens VBA editor)</li> </ol> <h3><strong>Step 2: Insert Module</strong></h3> <ol> <li>In the VBA editor, click <strong>Insert</strong> → <strong>Module</strong></li> <li>A blank code window will appear</li> </ol> <h3><strong>Step 3: Paste the Macro</strong></h3> <ol> <li>Copy and paste this code into the module:</li> </ol> <pre> Sub DeleteBetweenCAndQY() Columns("D:QX").Delete End Sub</pre> <h3><strong>Step 4: Run the Macro</strong></h3> <ol> <li>Press <code data-gramm="false">F5</code> (or click the ▶️ Run button)</li> <li>The columns will be deleted immediately</li> <li>Press <code data-gramm="false">Alt + Q</code> to close the VBA editor</li> </ol> <h3><strong>Step 5: Remove the Macro</strong></h3> <ol> <li>Press <code data-gramm="false">Alt + F11</code> again (reopen VBA editor)</li> <li>In the left panel (<strong>Project Explorer</strong>), find your workbook</li> <li>Expand <strong>Modules</strong> folder</li> <li>Right-click on <strong>Module1</strong></li> <li>Choose <strong>Remove Module1</strong></li> <li>Click <strong>No</strong> when asked "Do you want to export before removing?"</li> <li>Press <code data-gramm="false">Alt + Q</code> to close VBA editor</li> </ol> <h3><strong>Step 6: Save Normally</strong></h3> <ol> <li>Press <code data-gramm="false">Ctrl + S</code> to save</li> <li>Excel will save as a regular <code data-gramm="false">.xlsx</code> file (no macro warning)</li> </ol> </div><div class="field field--name-field-tags field--type-entity-reference field--label-above clearfix"> <h3 class="field__label">Značky</h3> <ul class="links field__items"> <li><a href="/taxonomy/term/78" hreflang="sk">Excel</a></li> </ul> </div> Wed, 12 Nov 2025 13:08:28 +0000ROOT172 at https://notes.masterweb.skhttps://notes.masterweb.sk/excel/remove-many-hidden-excel-columns-vba-macro#comments EXCEL https://notes.masterweb.sk/excel <span class="field field--name-title field--type-string field--label-hidden">EXCEL</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">ROOT</span></span> <span class="field field--name-created field--type-created field--label-hidden">St, 11/12/2025 - 14:07</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above clearfix"> <h3 class="field__label">Značky</h3> <ul class="links field__items"> <li><a href="/taxonomy/term/78" hreflang="sk">Excel</a></li> </ul> </div> Wed, 12 Nov 2025 13:07:48 +0000ROOT171 at https://notes.masterweb.skhttps://notes.masterweb.sk/excel#comments