Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jkf jkf is offline
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.programming
jkf jkf is offline
external usenet poster
 
Posts: 12
Default spread sheet

thank you jmb and tom all sugestions worked a treat
jkf


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
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet marc5354 Excel Worksheet Functions 2 September 21st 10 04:22 PM
how do i enter a bull call spread into the options spread sheet ? alvin smith Excel Worksheet Functions 0 November 27th 06 01:23 AM
spread sheet equality 547 New Users to Excel 2 May 5th 06 03:51 PM
Spread Sheet Help again califman1961 New Users to Excel 1 February 18th 05 09:00 PM
Spread sheet HELP! califman1961 New Users to Excel 1 February 18th 05 06:55 PM


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