Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Checking for text in Sheet Name

I am wanting to check for a specific grouping of text in the sheet name using
something similar to the SEARCH function. Let's say, for example, I want to
find if "1" is present in the sheet name. How would I code that?

Thanks,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Checking for text in Sheet Name

If InStr(1,ActiveSheet.Name,"1") 0 Then
'1 is in the name
Else
'1 is not in the name
End If

HTH

Die_Another_Day

Barb Reinhardt wrote:
I am wanting to check for a specific grouping of text in the sheet name using
something similar to the SEARCH function. Let's say, for example, I want to
find if "1" is present in the sheet name. How would I code that?

Thanks,
Barb Reinhardt


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Checking for text in Sheet Name

Check out VBA's InStr().



Barb Reinhardt wrote:

I am wanting to check for a specific grouping of text in the sheet name using
something similar to the SEARCH function. Let's say, for example, I want to
find if "1" is present in the sheet name. How would I code that?

Thanks,
Barb Reinhardt


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Checking for text in Sheet Name

Hi Barb,

x = InStr(1, ActiveSheet.Name, "1")
gives you the place of "1" in sheet name or 0 if "1" is not present.

Regards,
Stefi

€˛Barb Reinhardt€¯ ezt Ć*rta:

I am wanting to check for a specific grouping of text in the sheet name using
something similar to the SEARCH function. Let's say, for example, I want to
find if "1" is present in the sheet name. How would I code that?

Thanks,
Barb Reinhardt

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking if Sheet Exists? [email protected] Excel Discussion (Misc queries) 5 September 1st 06 03:27 PM
Checking to see a sheet of the same name exsists beans_21[_8_] Excel Programming 3 January 16th 06 06:32 PM
Checking if sheet is visible LAF Excel Discussion (Misc queries) 1 August 9th 05 09:20 PM
Checking for existence of value in another sheet [email protected] Excel Programming 2 October 20th 04 02:51 PM
Checking to see if a sheet is open Frank Kabel Excel Programming 1 September 10th 04 04:15 AM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"