Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
partial search
I have a macro. I want to search my worksheets to see if there is any
worksheet that has the current date as worksheet name. however the current date may only be part of the worksheet name eg "2006-09-19" or "2006-09-19 Vector". I do not know how to find the ones that have a name like "2006-09-19 Vector". My code now is: For j = 1 To i + 1 If Sheets(j).Name = Format(Date, "YYYY-MM-DD") Then 'wrong blnIsToday = True End If pls help me!! thanks very much!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
partial search
For j = 1 To i + 1
If instr(1,Sheets(j).Name,Format( _ Date, "YYYY-MM-DD"),vbTextcompare) Then set sh = Sheets(j) blnIsToday = True End If Next j -- Regards, Tom Ogilvy "Arne Hegefors" wrote: I have a macro. I want to search my worksheets to see if there is any worksheet that has the current date as worksheet name. however the current date may only be part of the worksheet name eg "2006-09-19" or "2006-09-19 Vector". I do not know how to find the ones that have a name like "2006-09-19 Vector". My code now is: For j = 1 To i + 1 If Sheets(j).Name = Format(Date, "YYYY-MM-DD") Then 'wrong blnIsToday = True End If pls help me!! thanks very much!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search for a partial number | Excel Worksheet Functions | |||
Partial string search w/o VBA? | Excel Discussion (Misc queries) | |||
how to use partial (word) search | Excel Programming | |||
Partial search and replace? | Excel Discussion (Misc queries) | |||
Partial Search using Macro | Excel Programming |