Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
first off i hope this is the right place for this question
at work we have a spread sheet that we need on a day to day basis, that is easy enough , but now as it is a 24/7 buisness the powers that be have asked for each spread sheet to include the 3 shifts ie Days 01.01.01 Lates 01.01.01. Nights 01.01.01 the formula i have been using for the day to day all shift log is SUB ADDSHEET() FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" NEXT G END SUB which works great i just ammend it to suit month and number of days in month. so question is how do i do it so it will include the 3 shifts for each day of month tia jkf |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
I've seen this question somewhere else !
Check there for the replies Steve On Sun, 01 Oct 2006 17:46:23 +0100, jkf wrote: first off i hope this is the right place for this question at work we have a spread sheet that we need on a day to day basis, that is easy enough , but now as it is a 24/7 buisness the powers that be have asked for each spread sheet to include the 3 shifts ie Days 01.01.01 Lates 01.01.01. Nights 01.01.01 the formula i have been using for the day to day all shift log is SUB ADDSHEET() FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" NEXT G END SUB which works great i just ammend it to suit month and number of days in month. so question is how do i do it so it will include the 3 shifts for each day of month tia jkf |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
Maybe you can use something like this:
Option Explicit Sub AddSheets() Dim iCtr As Long Dim myStartDate As Date myStartDate = Application.InputBox(Prompt:="Please Enter a start date", _ Default:=Format(Date - Day(Date) + 1, "mmmm dd, yyyy"), _ Type:=1) If Year(myStartDate) < 2006 Then Exit Sub End If For iCtr = DateSerial(Year(myStartDate), Month(myStartDate), 1) _ To DateSerial(Year(myStartDate), Month(myStartDate) + 1, 0) Worksheets.Add.Name = Format(iCtr, "dd.mm.yy") Next iCtr End Sub jkf wrote: first off i hope this is the right place for this question at work we have a spread sheet that we need on a day to day basis, that is easy enough , but now as it is a 24/7 buisness the powers that be have asked for each spread sheet to include the 3 shifts ie Days 01.01.01 Lates 01.01.01. Nights 01.01.01 the formula i have been using for the day to day all shift log is SUB ADDSHEET() FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" NEXT G END SUB which works great i just ammend it to suit month and number of days in month. so question is how do i do it so it will include the 3 shifts for each day of month tia jkf -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
jfk posted in at least 3 forums and got *duplicate* and replies in all 3 :)
If only the news servers where connected in real time :) Steve On Sun, 01 Oct 2006 19:29:04 +0100, Dave Peterson wrote: Maybe you can use something like this: Option Explicit Sub AddSheets() Dim iCtr As Long Dim myStartDate As Date myStartDate = Application.InputBox(Prompt:="Please Enter a start date", _ Default:=Format(Date - Day(Date) + 1, "mmmm dd, yyyy"), _ Type:=1) If Year(myStartDate) < 2006 Then Exit Sub End If For iCtr = DateSerial(Year(myStartDate), Month(myStartDate), 1) _ To DateSerial(Year(myStartDate), Month(myStartDate) + 1, 0) Worksheets.Add.Name = Format(iCtr, "dd.mm.yy") Next iCtr End Sub jkf wrote: first off i hope this is the right place for this question at work we have a spread sheet that we need on a day to day basis, that is easy enough , but now as it is a 24/7 buisness the powers that be have asked for each spread sheet to include the 3 shifts ie Days 01.01.01 Lates 01.01.01. Nights 01.01.01 the formula i have been using for the day to day all shift log is SUB ADDSHEET() FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" NEXT G END SUB which works great i just ammend it to suit month and number of days in month. so question is how do i do it so it will include the 3 shifts for each day of month tia jkf |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
Or if jkf would have crossposted one message to all the newsgroups that he/she
wanted--instead of multiposting separate messages to each. SteveW wrote: jfk posted in at least 3 forums and got *duplicate* and replies in all 3 :) If only the news servers where connected in real time :) Steve On Sun, 01 Oct 2006 19:29:04 +0100, Dave Peterson wrote: Maybe you can use something like this: Option Explicit Sub AddSheets() Dim iCtr As Long Dim myStartDate As Date myStartDate = Application.InputBox(Prompt:="Please Enter a start date", _ Default:=Format(Date - Day(Date) + 1, "mmmm dd, yyyy"), _ Type:=1) If Year(myStartDate) < 2006 Then Exit Sub End If For iCtr = DateSerial(Year(myStartDate), Month(myStartDate), 1) _ To DateSerial(Year(myStartDate), Month(myStartDate) + 1, 0) Worksheets.Add.Name = Format(iCtr, "dd.mm.yy") Next iCtr End Sub jkf wrote: first off i hope this is the right place for this question at work we have a spread sheet that we need on a day to day basis, that is easy enough , but now as it is a 24/7 buisness the powers that be have asked for each spread sheet to include the 3 shifts ie Days 01.01.01 Lates 01.01.01. Nights 01.01.01 the formula i have been using for the day to day all shift log is SUB ADDSHEET() FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" NEXT G END SUB which works great i just ammend it to suit month and number of days in month. so question is how do i do it so it will include the 3 shifts for each day of month tia jkf -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
thank you for your replies all worked to what i wanted.
and i am sorry for cross posting ,but as i opened my request i was not sure if it was the right place to ask such a question. but once again thank you |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
spread sheet
You did not cross-post.......you multi-posted.
There is a big difference. With cross-posting those of us with news readers can get the cross-posts flagged. Multi-posts cannot be flagged. Gord Dibben MS Excel MVP On Sun, 1 Oct 2006 22:26:49 +0100, "jkf" wrote: thank you for your replies all worked to what i wanted. and i am sorry for cross posting ,but as i opened my request i was not sure if it was the right place to ask such a question. but once again thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
spread sheet disappears | Excel Discussion (Misc queries) | |||
How do I link data from a cell on one spread sheet to another? | Excel Worksheet Functions | |||
Master spread sheet to manage then show info on seperate tabs | Excel Worksheet Functions | |||
Can I add more columns to a spread sheet or is limit 256 columns | Excel Discussion (Misc queries) | |||
Does excel recognise names rather than cells? | Excel Worksheet Functions |