Excel vba check if sheet exists => http://foldiaclevheart.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6MzE6IkV4Y2VsIHZiYSBjaGVjayBpZiBzaGVldCBleGlzdHMiO30= The code I gave you wasn't intended to be a full working routine. I've already tried Code: application. I have not protected the workbook and the unprotect sheet function is now greyed out. If you liked our blogs, share it with your friends on. The following simple macro will provide a quick and easy way to make sure a Worksheet exists in a Workbook before you start any changes or other processing on that worksheet. We want to all be in the same document at the same time saving changes. Check Worksheet Exists Step 1 Open the workbook that needs the Worksheet Exists check. If you need to change it as per your code, you may. I need to look up data from a cell on one Excel sheet, compare it to a list on a 2nd sheet and when they equal, take a value from a different column on the 2nd sheet and drop it back on the 1st sheet. I want my macro to delete the selected item from my worksheet. When you posted you question, you should have seen 5 possible answers. Worksheets and Next Sht are the starting and ending parts of the loop respectively. Hi If you are going to overwrite them anyway, Just use this: Application. The macro will display the status in the form of message box. Check if sheet exists vba - End If Regards, OssieMac My appologies for not being clear. I want my macro to delete the selected item from my worksheet. Name exists before hiding columns. Does anyone know why this code doesn't work. Names strRangeName1 Is Nothing Then sht. Names strRangeName1 Is Nothing Then It errors because the range object doesn't exist. There is a difference between a range object that exists but has not been assigned to a range dimmed but not Set to anything for example and a range object that doesn't exist. If RangeName1 is a named range on the worksheet then I think your code should be something like the following. Range strRangeName1 Is Nothing Then sht. End If Regards, OssieMac My appologies for not being clear. excel vba check if sheet exists The code I gave you wasn't intended to be a full working routine. I only included the part that I was concerned about regarding the test to see if the Worksheet. Name to indicate I'm referring to a Name in the Worksheet. Names collection, doesn't really matter how it was created. Names collection before proceeding with the code that follows the if statement??. If you are testing to see if the named range exists then the following. Added with edit after initial post: Basically attempt to use the named range with Errors turned off and see what it returns. I've already seen Jim's function code, it was actually submitted by Zack Barresse on vbaexpress. Thanks to both of you for your efforts.