Thread: Macro Help
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lisa Lisa is offline
external usenet poster
 
Posts: 328
Default Macro Help

If possible they would like the sheet name as a date. So if today was the
first day of the job instead of Day 1 it would be 7-27-06, tomorrow instead
of Day 2 would be 7-28-06, etc...

"SimonCC" wrote:

The formula I gave relies on the fact that sheet names will always be "Day "
plus a number. So basically just have to extract the number part from the
current, then "Day "&number-1 will simply refer to the previous sheet.

However, if the sheetname is like dates, then it becomes a bit more
complicated for beginning of the month/year. For instance if it's 8/1/2006
and your sheetname is 08-01-06, subtracting 1 from the middle will give you
08-00-06 which is wrong.

I think it's doable if I just convert the date format to a numbered value.
I can give it a try, but first you should let me know what format the
sheetname is going to be. For example, if it was today, would the sheetname
look like 07-27-06, 060727, 07-27, 2006-07-27, 0727, or something else?

-Simon

"Lisa" wrote:

It works, It works, Thank you a million times over. Next question.....In an
earlier post you said it will not work if the sheetname is not in the format
of Day 1, Day 2, etc.... If the field supervisor wants the sheetname to be
the date of the workday how would I change the formula to reflect that
instead of the Day 1, Day 2.