Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
I've been having a problem trying to do something I believed would be easy. I have a list of dates and numbers. I want to have a script that, by default, would match today's date with the dates in the list, and for each matching date, create a new worksheet named the number. If anyone can give me some assistance, I would appreciate it very much. Thanks, Tanama --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to just loop through your list:
Option Explicit Sub testme() Dim myCell As Range Dim myRng As Range Dim wks As Worksheet For Each myCell In Worksheets("sheet1").Range("a1:a20").Cells If myCell.Value2 = CLng(Date) Then Set wks = Worksheets.Add On Error Resume Next wks.Name = myCell.Offset(0, 1).Text '.value??? If Err.Number < 0 Then MsgBox "Renamed failed for sheet: " & wks.Name Err.Clear End If On Error GoTo 0 End If Next myCell End Sub "tanama <" wrote: Hi Everyone, I've been having a problem trying to do something I believed would be easy. I have a list of dates and numbers. I want to have a script that, by default, would match today's date with the dates in the list, and for each matching date, create a new worksheet named the number. If anyone can give me some assistance, I would appreciate it very much. Thanks, Tanama --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract list of units based on error criteria to new list | Excel Worksheet Functions | |||
how do I generate lists in worksheets based on a master list works | Excel Worksheet Functions | |||
Separating a List onto multiple worksheets in the same workbook based off 1 criteria | Excel Worksheet Functions | |||
Creating number of worksheets based on list | Excel Discussion (Misc queries) | |||
Can you sort a list based on catagory names without useing a custom list? | Excel Programming |