Results 1 to 7 of 7

Delete rows/columns across worksheets

Threaded View

  1. #1
    Registered User
    Join Date
    11-26-2015
    Location
    London, England
    MS-Off Ver
    10
    Posts
    4

    Delete rows/columns across worksheets

    Hello Leith,

    I'm also fairly new to VBA programming, but I'm attempting to create a similar solution that will delete blank columns across all worksheets building on what you provided to ncalsurfer. Obviously this is more difficult than I expected. Here's what I've got so far:
    Sub Remove_Blanks_ALL_Sheets()
    '
    ' Remove_Blank_Columns Macro
    ' Macro to remove blank columns in all sheets
    '
    ' Keyboard Shortcut: Ctrl+r
    '
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        ws.Cells.Select
        ws.Selection.SpecialCells(xlCellTypeBlanks).Select
        ws.Select.EntireColumn.Delete
    Next ws
    End Sub
    Your assistance would be greatly appreciated. I'm using Excel 2007, but also have access to Excel 2010 if needed.
    Last edited by Leith Ross; 11-27-2015 at 02:53 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Delete rows based on the value of two columns using VBA code - Multiple worksheets
    By OmniBlue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2015, 04:24 PM
  2. [SOLVED] delete columns in related worksheets
    By aaaaa34 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2014, 10:47 AM
  3. Replies: 6
    Last Post: 03-04-2013, 12:03 AM
  4. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  5. Delete & Merge Columns,Delete Rows with filter, etc
    By traderindia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2009, 02:12 AM
  6. Delete rows/columns across all worksheets
    By ncalsurfer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2009, 06:59 PM
  7. [SOLVED] Delete same Rows/Columns from two worksheets at a time
    By Vinit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1