+ Reply to Thread
Results 1 to 4 of 4

If Worksheet name is Number Then...

  1. #1
    Forum Contributor
    Join Date
    05-26-2004
    Location
    Halifax, UK
    MS-Off Ver
    Office 2016
    Posts
    260

    If Worksheet name is Number Then...

    Is it possible to write a macro that looks at every worksheet name and for those that consist of numbers perform some action? The logic would have to look something like:

    For every worksheet in workbook
    If worksheet name is number then
    do stuff
    Else
    do nothing

    Also I'm trying to write code that also counts the number of worksheets that have names that are numbers. I expect this could be made part of the above code, say create a variable that keeps count of how many worksheets have been evaluated as having a number for a name.

    Thanks for any help given.

    Rob
    Last edited by TheRobsterUK; 02-26-2014 at 06:05 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,632

    Re: If Worksheet name is Number Then...

    for instance:
    Please Login or Register  to view this content.
    and as a function

    Please Login or Register  to view this content.
    Last edited by Kaper; 02-25-2014 at 09:14 AM.
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: If Worksheet name is Number Then...

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: If Worksheet name is Number Then...

    Maybe:

    Please Login or Register  to view this content.

+ 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. Search worksheet for certain text + number combo and then increment the number
    By hal9000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2013, 06:09 PM
  2. [SOLVED] Copy set number of cells a set number of times within same worksheet
    By hal9000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2013, 11:51 AM
  3. [SOLVED] Replacing a referenced worksheet name with a variable worksheet index number.
    By sdavison in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2013, 09:49 AM
  4. Basic Question - How do I return the worksheet number of the active worksheet?
    By Regnab in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2006, 10:10 PM
  5. add 'x' number of worksheets based on a number in a worksheet.
    By mmamin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2005, 07:11 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