Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
spread sheet
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.programming
|
|||
|
|||
spread sheet
SUB ADDSHEET()
FOR G = 31 TO 1 STEP - 1 SHEETS.ADD.NAME = G & ".10.06" & " Days" SHEETS.ADD.NAME = G & ".10.06" & " Lates" SHEETS.ADD.NAME = G & ".10.06" & " Nights" NEXT G END SUB or SHEETS.ADD.NAME = "Days " & G & ".10.06" SHEETS.ADD.NAME = "Lates " & G & ".10.06" SHEETS.ADD.NAME = "Nights " & G & ".10.06" -- Regards, Tom Ogilvy "jkf" wrote in message ... 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.programming
|
|||
|
|||
spread sheet
Try
Sub ADDSHEET() Dim varShifts As Variant Dim g As Long Dim t As Long varShifts = Array("Nights", "Lates", "Days") For g = 31 To 1 Step -1 For t = LBound(varShifts) To UBound(varShifts) Sheets.Add.Name = varShifts(t) & " " & g & ".10.06" Next t Next g End Sub "jkf" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
spread sheet
thank you jmb and tom all sugestions worked a treat
jkf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet | Excel Worksheet Functions | |||
how do i enter a bull call spread into the options spread sheet ? | Excel Worksheet Functions | |||
spread sheet | New Users to Excel | |||
Spread Sheet Help again | New Users to Excel | |||
Spread sheet HELP! | New Users to Excel |