Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Option explicit
sub testme()
dim dCtr as long

for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
worksheets.add.name = format(dctr, "mmm d")
next dctr

end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jugglertwo wrote:

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Dave, thank you so much for the code. It worked great !
I hate to be a pain, but ........
The code produces Dec 25, dec 24, Dec 23, Dec 22....Jan 3, Jan 2, Jan 1
Can the code easily be adjusted so I get Jan 1, Jan 2, Jan 3........Dec 22,
Dec 23, Dec 24, Dec 25?

Thanks!
Jugglertwo

"Dave Peterson" wrote:

Option explicit
sub testme()
dim dCtr as long

for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
worksheets.add.name = format(dctr, "mmm d")
next dctr

end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jugglertwo wrote:

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Opps, first line should be
mydate = DateSerial(2008, 12, 31)

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Jugglertwo" wrote in message
...
I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Change:
for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
to
for dctr = dateserial(2007, 12, 31) to dateserial(2007,1,1) step - 1



Jugglertwo wrote:

Dave, thank you so much for the code. It worked great !
I hate to be a pain, but ........
The code produces Dec 25, dec 24, Dec 23, Dec 22....Jan 3, Jan 2, Jan 1
Can the code easily be adjusted so I get Jan 1, Jan 2, Jan 3........Dec 22,
Dec 23, Dec 24, Dec 25?

Thanks!
Jugglertwo

"Dave Peterson" wrote:

Option explicit
sub testme()
dim dCtr as long

for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
worksheets.add.name = format(dctr, "mmm d")
next dctr

end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jugglertwo wrote:

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Let's try again

Sub makesheet()
mydate = DateSerial(2008, 12, 31)
Do Until mydate = DateSerial(2007, 12, 31)
Set NewSheet = Worksheets.Add
myname = Format(mydate, "mmm dd")
NewSheet.Name = myname
mydate = mydate - 1
Loop
End Sub

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Jugglertwo" wrote in message
...
I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Just to add...

In the code I used, I used dates in 2007. If you want dates in 2008 (including
Feb 29), then change those dates in the "for dctr" line.



Dave Peterson wrote:

Change:
for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
to
for dctr = dateserial(2007, 12, 31) to dateserial(2007,1,1) step - 1

Jugglertwo wrote:

Dave, thank you so much for the code. It worked great !
I hate to be a pain, but ........
The code produces Dec 25, dec 24, Dec 23, Dec 22....Jan 3, Jan 2, Jan 1
Can the code easily be adjusted so I get Jan 1, Jan 2, Jan 3........Dec 22,
Dec 23, Dec 24, Dec 25?

Thanks!
Jugglertwo

"Dave Peterson" wrote:

Option explicit
sub testme()
dim dCtr as long

for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
worksheets.add.name = format(dctr, "mmm d")
next dctr

end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jugglertwo wrote:

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

Thanks for your continued assistance !
It is appreciated !
Jugglertwo

"Dave Peterson" wrote:

Just to add...

In the code I used, I used dates in 2007. If you want dates in 2008 (including
Feb 29), then change those dates in the "for dctr" line.



Dave Peterson wrote:

Change:
for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
to
for dctr = dateserial(2007, 12, 31) to dateserial(2007,1,1) step - 1

Jugglertwo wrote:

Dave, thank you so much for the code. It worked great !
I hate to be a pain, but ........
The code produces Dec 25, dec 24, Dec 23, Dec 22....Jan 3, Jan 2, Jan 1
Can the code easily be adjusted so I get Jan 1, Jan 2, Jan 3........Dec 22,
Dec 23, Dec 24, Dec 25?

Thanks!
Jugglertwo

"Dave Peterson" wrote:

Option explicit
sub testme()
dim dCtr as long

for dctr = dateserial(2007,1,1) to dateserial(2007, 12, 31)
worksheets.add.name = format(dctr, "mmm d")
next dctr

end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jugglertwo wrote:

I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default SS tabs reading Dec 1, Dec 2, Dec 3, etc

thanks for your additional code to solve this problem.
I have filed the code away. I will use it now and in the future.
Thanks!
Jugglertwo

"Bernard Liengme" wrote:

Let's try again

Sub makesheet()
mydate = DateSerial(2008, 12, 31)
Do Until mydate = DateSerial(2007, 12, 31)
Set NewSheet = Worksheets.Add
myname = Format(mydate, "mmm dd")
NewSheet.Name = myname
mydate = mydate - 1
Loop
End Sub

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Jugglertwo" wrote in message
...
I have an Excel colleague that wishes to create a ss for every day of the
year so 365 ss in a workbook.
Is there a quick way to create these?
I would assume it would involve some vba code.
Any assistance would be greatly appreciated !
Thanks!
Jugglertwo




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
reading from SQL Texas Tonie[_2_] Excel Discussion (Misc queries) 0 November 9th 07 10:59 PM
Reading XML Ajit Excel Discussion (Misc queries) 1 October 2nd 07 10:54 PM
Reading tabs name smaruzzi Excel Discussion (Misc queries) 1 October 7th 06 05:16 PM
Reading tabs names smaruzzi Excel Discussion (Misc queries) 2 October 7th 06 01:41 PM
Checkbox reading Jonah Excel Worksheet Functions 2 November 19th 04 11:17 PM


All times are GMT +1. The time now is 07:53 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"