+ Reply to Thread
Results 1 to 5 of 5

How to check sheet Name exist or not in particuler workbook

  1. #1
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    How to check sheet Name exist or not in particuler workbook

    Hi Experts,

    i have multiple folders and have multiple excel files in it.
    i am trying to open each folder and open each excel file
    when i open excel file of that particular folder i have extract some date from the sheet Name ("Enter Data").

    Problem is that some of the excel have no such type of sheets so i just want to know how do i check the sheet name "Enter Data") is available or not

    Please suggest.

    My Code is below

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to check sheet Name exist or not in particuler workbook

    You could use this UDF to find if a given workbook, has a sheet with a particular name.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241
    Quote Originally Posted by mohan.r1980 View Post
    Hi Experts,

    i have multiple folders and have multiple excel files in it.
    i am trying to open each folder and open each excel file
    when i open excel file of that particular folder i have extract some date from the sheet Name ("Enter Data").

    Problem is that some of the excel have no such type of sheets so i just want to know how do i check the sheet name "Enter Data") is available or not

    Please suggest.

    My Code is below

    Please Login or Register  to view this content.
    Not test maybe like this
    Please Login or Register  to view this content.
    Last edited by daboho; 10-15-2018 at 09:54 AM.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: How to check sheet Name exist or not in particuler workbook

    I'd do it like mikerickson, but using IsObject function instead of using text comparison.

    Ex:
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  5. #5
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to check sheet Name exist or not in particuler workbook

    thanks for reply

    mikerickson and CK76 your solution working fine.

    thanks you very much to all.

+ 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. [SOLVED] Check if sheet name already exist
    By Tpleme in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2018, 09:39 AM
  2. Before run code Check first if sheet name exist or not
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2017, 06:19 AM
  3. [SOLVED] Check First IF Sheet Is Exist With The Name Of Cell K7 If exist Then run the code
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-18-2015, 10:08 AM
  4. [SOLVED] check column headers against sheet names if sheet not exist create it
    By AkaTrouble in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2015, 05:59 PM
  5. Function to check the sheet name exist or not based on sheet values
    By narendrabr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-12-2014, 09:37 AM
  6. macro to check if a value exist in sheet and add it if it doesnt
    By RetroGun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-01-2011, 02:35 AM
  7. macro to check if a value exist in sheet and add it +other parts of row if it doesnt
    By RetroGun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2011, 07:14 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