+ Reply to Thread
Results 1 to 2 of 2

Delete worksheets based on blank data on setup sheet

  1. #1
    Registered User
    Join Date
    01-23-2018
    Location
    California, USA
    MS-Off Ver
    2016
    Posts
    9

    Delete worksheets based on blank data on setup sheet

    I need a macro that deletes sheets based on blank cells on a setup sheet. The setup sheet fills in data in the rest of the sheets in the workbook but not all sheets are needed in the end. If A5 is blank when the macro is ran, Sheet1 will be deleted, if A6 is blank then Sheet2, A7= Sheet8...

    The macro i'm currently using renames the sheets based on data inputted on the setup sheet. If the cell is blank I get an error that sheets cannot have the same name because it tries to rename the sheets with the blank cell.

    Thank you.
    Last edited by vqho90; 02-28-2018 at 11:03 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Delete worksheets based on blank data on setup sheet

    You could check to see if the cell is not blank and if it is you can run your code, for example:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Filter/delete rows based on data from different sheet?
    By realrookie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-20-2016, 03:53 PM
  2. Replies: 14
    Last Post: 05-10-2016, 09:33 PM
  3. Cell formatting based on criteria setup on another sheet
    By PlankSpank in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-11-2016, 03:11 PM
  4. Button to cut/paste to blank row in new sheet and delete blank row in old sheet
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2013, 05:18 PM
  5. delete blank rows in multiple worksheets
    By pacman76 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2012, 05:55 AM
  6. help, how to delete blank data in massive s'sheet
    By Pteridium in forum Excel General
    Replies: 2
    Last Post: 07-14-2010, 04:00 AM
  7. Macros to delete all blank worksheets in workbook
    By undergraduate in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-25-2010, 10:59 PM

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