+ Reply to Thread
Results 1 to 8 of 8

Attendance database programming

  1. #1
    AdministrationIntern
    Guest

    Attendance database programming

    I am creating an attendance database for my company.

    There are 19 different departments in the company and each manager tallies
    his/her own employee attendances.

    I had a spreadsheet set up, but it wasn't on a rolling calendar basis. Then,
    I was going to have the managers delete old months, but that would most
    likely mess with the formulas.

    So the new spreadsheet needs to be on a rolling calendar basis, so that when
    a new month comes up, the previous month from last year will drop off in
    calculations.

    My file has three worksheets, one titled "Summary", one titled "Details" and
    the last "Setup".

    The Summary page should tally the total absences from the year for each
    employee. It serves as a quick view. The Details page is where Managers
    enter information about each individual employee, each day they are late, or
    don't show up for work. What I would like to do on the set-up page is to
    create a reference start date, so the Details page can reference this and add
    365 days...and sum the number of absences within that range. I don't know how
    to do this. How should the sheets be set up. Can someone please help?

    Thank you.


  2. #2
    Alf Bryn
    Guest

    Re: Attendance database programming

    Not sure I understood your problem righ but perhaps you could do something
    like this.

    Sub Auto_Open()

    '
    Dim i As Integer
    Application.DisplayAlerts = False
    For i = Sheets.Count To 12 Step -1

    If i > 13 Then
    Sheets(i).Delete
    End If
    Next i
    Application.DisplayAlerts = True

    End Sub

    This assumes that the oldest sheet is the last one in the row of sheets.

    "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    wrote in message news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    >I am creating an attendance database for my company.
    >
    > There are 19 different departments in the company and each manager tallies
    > his/her own employee attendances.
    >
    > I had a spreadsheet set up, but it wasn't on a rolling calendar basis.
    > Then,
    > I was going to have the managers delete old months, but that would most
    > likely mess with the formulas.
    >
    > So the new spreadsheet needs to be on a rolling calendar basis, so that
    > when
    > a new month comes up, the previous month from last year will drop off in
    > calculations.
    >
    > My file has three worksheets, one titled "Summary", one titled "Details"
    > and
    > the last "Setup".
    >
    > The Summary page should tally the total absences from the year for each
    > employee. It serves as a quick view. The Details page is where Managers
    > enter information about each individual employee, each day they are late,
    > or
    > don't show up for work. What I would like to do on the set-up page is to
    > create a reference start date, so the Details page can reference this and
    > add
    > 365 days...and sum the number of absences within that range. I don't know
    > how
    > to do this. How should the sheets be set up. Can someone please help?
    >
    > Thank you.
    >




  3. #3
    AdministrationIntern
    Guest

    Re: Attendance database programming

    Alf,

    Thanks for your reply. Not quite sure I understand your recommendations
    because I am VERY new to Excel.

    Let me clarify how the database is set up. Currently, there are 5
    worksheets. The first is a "Year-to-Date". The next four worksheets are for
    each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".

    The policy is going to begin July 14th, so in Qtr1 worksheet, it begins on
    July 14th and goes until October 13th. Qtr2 worksheet begins with October
    14th and goes until Jan 13th. I have my dates going across the top, and the
    employee names going down the side. The "Year-to-Date" worksheet sums up the
    four quarters.

    So my question is whether or not I'll be able to sum absences for a 12 month
    basis. So in July of 2006, the number of absences from June 05 would not be
    counted. Similarly, in August of 2006, the number of absences from July 05
    would not be counted.

    Does this make sense?

    Thank you in advance for any help that you may be able to give.

    -Angie

    "Alf Bryn" wrote:

    > Not sure I understood your problem righ but perhaps you could do something
    > like this.
    >
    > Sub Auto_Open()
    >
    > '
    > Dim i As Integer
    > Application.DisplayAlerts = False
    > For i = Sheets.Count To 12 Step -1
    >
    > If i > 13 Then
    > Sheets(i).Delete
    > End If
    > Next i
    > Application.DisplayAlerts = True
    >
    > End Sub
    >
    > This assumes that the oldest sheet is the last one in the row of sheets.
    >
    > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > wrote in message news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    > >I am creating an attendance database for my company.
    > >
    > > There are 19 different departments in the company and each manager tallies
    > > his/her own employee attendances.
    > >
    > > I had a spreadsheet set up, but it wasn't on a rolling calendar basis.
    > > Then,
    > > I was going to have the managers delete old months, but that would most
    > > likely mess with the formulas.
    > >
    > > So the new spreadsheet needs to be on a rolling calendar basis, so that
    > > when
    > > a new month comes up, the previous month from last year will drop off in
    > > calculations.
    > >
    > > My file has three worksheets, one titled "Summary", one titled "Details"
    > > and
    > > the last "Setup".
    > >
    > > The Summary page should tally the total absences from the year for each
    > > employee. It serves as a quick view. The Details page is where Managers
    > > enter information about each individual employee, each day they are late,
    > > or
    > > don't show up for work. What I would like to do on the set-up page is to
    > > create a reference start date, so the Details page can reference this and
    > > add
    > > 365 days...and sum the number of absences within that range. I don't know
    > > how
    > > to do this. How should the sheets be set up. Can someone please help?
    > >
    > > Thank you.
    > >

    >
    >
    >


  4. #4
    Alf Bryn
    Guest

    Re: Attendance database programming

    Thanks for clarification. I see now that did not understand what you wanted
    to do.

    I'm sorry that I can't help you with your problem. My advice to you if you
    don't get any help is to repost your problem in 3 to 4 days describing in
    detail what you want to do.

    A cople of quick questions. The date column in the "Q1" is this dayly basis?
    I.e first date column is July 14th, the next July 15th and so forth or is it
    done in some other formate?

    After a year do you plan to uppdate "Q1" with "new" data or are you adding a
    new sheet?

    "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    wrote in message news:CFCCC627-F19C-44A7-BB57-38886BE04C07@microsoft.com...
    > Alf,
    >
    > Thanks for your reply. Not quite sure I understand your recommendations
    > because I am VERY new to Excel.
    >
    > Let me clarify how the database is set up. Currently, there are 5
    > worksheets. The first is a "Year-to-Date". The next four worksheets are
    > for
    > each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".
    >
    > The policy is going to begin July 14th, so in Qtr1 worksheet, it begins on
    > July 14th and goes until October 13th. Qtr2 worksheet begins with October
    > 14th and goes until Jan 13th. I have my dates going across the top, and
    > the
    > employee names going down the side. The "Year-to-Date" worksheet sums up
    > the
    > four quarters.
    >
    > So my question is whether or not I'll be able to sum absences for a 12
    > month
    > basis. So in July of 2006, the number of absences from June 05 would not
    > be
    > counted. Similarly, in August of 2006, the number of absences from July 05
    > would not be counted.
    >
    > Does this make sense?
    >
    > Thank you in advance for any help that you may be able to give.
    >
    > -Angie
    >
    > "Alf Bryn" wrote:
    >
    >> Not sure I understood your problem righ but perhaps you could do
    >> something
    >> like this.
    >>
    >> Sub Auto_Open()
    >>
    >> '
    >> Dim i As Integer
    >> Application.DisplayAlerts = False
    >> For i = Sheets.Count To 12 Step -1
    >>
    >> If i > 13 Then
    >> Sheets(i).Delete
    >> End If
    >> Next i
    >> Application.DisplayAlerts = True
    >>
    >> End Sub
    >>
    >> This assumes that the oldest sheet is the last one in the row of sheets.
    >>
    >> "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    >> wrote in message
    >> news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    >> >I am creating an attendance database for my company.
    >> >
    >> > There are 19 different departments in the company and each manager
    >> > tallies
    >> > his/her own employee attendances.
    >> >
    >> > I had a spreadsheet set up, but it wasn't on a rolling calendar basis.
    >> > Then,
    >> > I was going to have the managers delete old months, but that would most
    >> > likely mess with the formulas.
    >> >
    >> > So the new spreadsheet needs to be on a rolling calendar basis, so that
    >> > when
    >> > a new month comes up, the previous month from last year will drop off
    >> > in
    >> > calculations.
    >> >
    >> > My file has three worksheets, one titled "Summary", one titled
    >> > "Details"
    >> > and
    >> > the last "Setup".
    >> >
    >> > The Summary page should tally the total absences from the year for each
    >> > employee. It serves as a quick view. The Details page is where
    >> > Managers
    >> > enter information about each individual employee, each day they are
    >> > late,
    >> > or
    >> > don't show up for work. What I would like to do on the set-up page is
    >> > to
    >> > create a reference start date, so the Details page can reference this
    >> > and
    >> > add
    >> > 365 days...and sum the number of absences within that range. I don't
    >> > know
    >> > how
    >> > to do this. How should the sheets be set up. Can someone please help?
    >> >
    >> > Thank you.
    >> >

    >>
    >>
    >>




  5. #5
    AdministrationIntern
    Guest

    Re: Attendance database programming

    Alf,

    Yes, sorry for not being clear before.

    As for the date, it is a daily thing. So yes, it would proceed as 7/14/2006.
    Then 7/15/2006. Then 7/16/2006.

    Also, after the end of this current year, I think new worksheets would be
    added. This is only for the ease of the people inputting the data - so they
    wouldn't have to go and clear old information out.

    Does this make sense?

    -Angie


    "Alf Bryn" wrote:

    > Thanks for clarification. I see now that did not understand what you wanted
    > to do.
    >
    > I'm sorry that I can't help you with your problem. My advice to you if you
    > don't get any help is to repost your problem in 3 to 4 days describing in
    > detail what you want to do.
    >
    > A cople of quick questions. The date column in the "Q1" is this dayly basis?
    > I.e first date column is July 14th, the next July 15th and so forth or is it
    > done in some other formate?
    >
    > After a year do you plan to uppdate "Q1" with "new" data or are you adding a
    > new sheet?
    >
    > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > wrote in message news:CFCCC627-F19C-44A7-BB57-38886BE04C07@microsoft.com...
    > > Alf,
    > >
    > > Thanks for your reply. Not quite sure I understand your recommendations
    > > because I am VERY new to Excel.
    > >
    > > Let me clarify how the database is set up. Currently, there are 5
    > > worksheets. The first is a "Year-to-Date". The next four worksheets are
    > > for
    > > each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".
    > >
    > > The policy is going to begin July 14th, so in Qtr1 worksheet, it begins on
    > > July 14th and goes until October 13th. Qtr2 worksheet begins with October
    > > 14th and goes until Jan 13th. I have my dates going across the top, and
    > > the
    > > employee names going down the side. The "Year-to-Date" worksheet sums up
    > > the
    > > four quarters.
    > >
    > > So my question is whether or not I'll be able to sum absences for a 12
    > > month
    > > basis. So in July of 2006, the number of absences from June 05 would not
    > > be
    > > counted. Similarly, in August of 2006, the number of absences from July 05
    > > would not be counted.
    > >
    > > Does this make sense?
    > >
    > > Thank you in advance for any help that you may be able to give.
    > >
    > > -Angie
    > >
    > > "Alf Bryn" wrote:
    > >
    > >> Not sure I understood your problem righ but perhaps you could do
    > >> something
    > >> like this.
    > >>
    > >> Sub Auto_Open()
    > >>
    > >> '
    > >> Dim i As Integer
    > >> Application.DisplayAlerts = False
    > >> For i = Sheets.Count To 12 Step -1
    > >>
    > >> If i > 13 Then
    > >> Sheets(i).Delete
    > >> End If
    > >> Next i
    > >> Application.DisplayAlerts = True
    > >>
    > >> End Sub
    > >>
    > >> This assumes that the oldest sheet is the last one in the row of sheets.
    > >>
    > >> "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > >> wrote in message
    > >> news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    > >> >I am creating an attendance database for my company.
    > >> >
    > >> > There are 19 different departments in the company and each manager
    > >> > tallies
    > >> > his/her own employee attendances.
    > >> >
    > >> > I had a spreadsheet set up, but it wasn't on a rolling calendar basis.
    > >> > Then,
    > >> > I was going to have the managers delete old months, but that would most
    > >> > likely mess with the formulas.
    > >> >
    > >> > So the new spreadsheet needs to be on a rolling calendar basis, so that
    > >> > when
    > >> > a new month comes up, the previous month from last year will drop off
    > >> > in
    > >> > calculations.
    > >> >
    > >> > My file has three worksheets, one titled "Summary", one titled
    > >> > "Details"
    > >> > and
    > >> > the last "Setup".
    > >> >
    > >> > The Summary page should tally the total absences from the year for each
    > >> > employee. It serves as a quick view. The Details page is where
    > >> > Managers
    > >> > enter information about each individual employee, each day they are
    > >> > late,
    > >> > or
    > >> > don't show up for work. What I would like to do on the set-up page is
    > >> > to
    > >> > create a reference start date, so the Details page can reference this
    > >> > and
    > >> > add
    > >> > 365 days...and sum the number of absences within that range. I don't
    > >> > know
    > >> > how
    > >> > to do this. How should the sheets be set up. Can someone please help?
    > >> >
    > >> > Thank you.
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    KR
    Guest

    Re: Attendance database programming

    Angie-

    If I were setting this up from scratch, I would probably put the dates in
    Column A, and the names across the top (assuming you don't have over ~200
    people).

    By having all the dates (365/year) even if you don't use them all, you have
    several options:
    (1) you could use an employee total on a rolling 365 days, giving you a
    true, accurate rolling total with a simple formula, and
    (2) if you need quarterly summary data (although your date ranges seem
    unusual, I've never seen a company with quarters that start in the middle of
    the month) you could adjust your formula to only include the months of
    interest.

    You would no longer need to worry about multiple sheets, or adding sheets
    each quarter and updating your formulas to reference them.

    If you decide to go this route, re-post and I'd be glad to help you with the
    365 day rolling formula (based on brilliant work from others in this group)

    Thanks,
    Keith

    "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    wrote in message news:49EB6BDF-E0DA-4F82-A843-38542547D83A@microsoft.com...
    > Alf,
    >
    > Yes, sorry for not being clear before.
    >
    > As for the date, it is a daily thing. So yes, it would proceed as

    7/14/2006.
    > Then 7/15/2006. Then 7/16/2006.
    >
    > Also, after the end of this current year, I think new worksheets would be
    > added. This is only for the ease of the people inputting the data - so

    they
    > wouldn't have to go and clear old information out.
    >
    > Does this make sense?
    >
    > -Angie
    >
    >
    > "Alf Bryn" wrote:
    >
    > > Thanks for clarification. I see now that did not understand what you

    wanted
    > > to do.
    > >
    > > I'm sorry that I can't help you with your problem. My advice to you if

    you
    > > don't get any help is to repost your problem in 3 to 4 days describing

    in
    > > detail what you want to do.
    > >
    > > A cople of quick questions. The date column in the "Q1" is this dayly

    basis?
    > > I.e first date column is July 14th, the next July 15th and so forth or

    is it
    > > done in some other formate?
    > >
    > > After a year do you plan to uppdate "Q1" with "new" data or are you

    adding a
    > > new sheet?
    > >
    > > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > > wrote in message

    news:CFCCC627-F19C-44A7-BB57-38886BE04C07@microsoft.com...
    > > > Alf,
    > > >
    > > > Thanks for your reply. Not quite sure I understand your

    recommendations
    > > > because I am VERY new to Excel.
    > > >
    > > > Let me clarify how the database is set up. Currently, there are 5
    > > > worksheets. The first is a "Year-to-Date". The next four worksheets

    are
    > > > for
    > > > each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".
    > > >
    > > > The policy is going to begin July 14th, so in Qtr1 worksheet, it

    begins on
    > > > July 14th and goes until October 13th. Qtr2 worksheet begins with

    October
    > > > 14th and goes until Jan 13th. I have my dates going across the top,

    and
    > > > the
    > > > employee names going down the side. The "Year-to-Date" worksheet sums

    up
    > > > the
    > > > four quarters.
    > > >
    > > > So my question is whether or not I'll be able to sum absences for a 12
    > > > month
    > > > basis. So in July of 2006, the number of absences from June 05 would

    not
    > > > be
    > > > counted. Similarly, in August of 2006, the number of absences from

    July 05
    > > > would not be counted.
    > > >
    > > > Does this make sense?
    > > >
    > > > Thank you in advance for any help that you may be able to give.
    > > >
    > > > -Angie
    > > >
    > > > "Alf Bryn" wrote:
    > > >
    > > >> Not sure I understood your problem righ but perhaps you could do
    > > >> something
    > > >> like this.
    > > >>
    > > >> Sub Auto_Open()
    > > >>
    > > >> '
    > > >> Dim i As Integer
    > > >> Application.DisplayAlerts = False
    > > >> For i = Sheets.Count To 12 Step -1
    > > >>
    > > >> If i > 13 Then
    > > >> Sheets(i).Delete
    > > >> End If
    > > >> Next i
    > > >> Application.DisplayAlerts = True
    > > >>
    > > >> End Sub
    > > >>
    > > >> This assumes that the oldest sheet is the last one in the row of

    sheets.
    > > >>
    > > >> "AdministrationIntern"

    <AdministrationIntern@discussions.microsoft.com>
    > > >> wrote in message
    > > >> news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    > > >> >I am creating an attendance database for my company.
    > > >> >
    > > >> > There are 19 different departments in the company and each manager
    > > >> > tallies
    > > >> > his/her own employee attendances.
    > > >> >
    > > >> > I had a spreadsheet set up, but it wasn't on a rolling calendar

    basis.
    > > >> > Then,
    > > >> > I was going to have the managers delete old months, but that would

    most
    > > >> > likely mess with the formulas.
    > > >> >
    > > >> > So the new spreadsheet needs to be on a rolling calendar basis, so

    that
    > > >> > when
    > > >> > a new month comes up, the previous month from last year will drop

    off
    > > >> > in
    > > >> > calculations.
    > > >> >
    > > >> > My file has three worksheets, one titled "Summary", one titled
    > > >> > "Details"
    > > >> > and
    > > >> > the last "Setup".
    > > >> >
    > > >> > The Summary page should tally the total absences from the year for

    each
    > > >> > employee. It serves as a quick view. The Details page is where
    > > >> > Managers
    > > >> > enter information about each individual employee, each day they are
    > > >> > late,
    > > >> > or
    > > >> > don't show up for work. What I would like to do on the set-up page

    is
    > > >> > to
    > > >> > create a reference start date, so the Details page can reference

    this
    > > >> > and
    > > >> > add
    > > >> > 365 days...and sum the number of absences within that range. I

    don't
    > > >> > know
    > > >> > how
    > > >> > to do this. How should the sheets be set up. Can someone please

    help?
    > > >> >
    > > >> > Thank you.
    > > >> >
    > > >>
    > > >>
    > > >>

    > >
    > >
    > >




  7. #7
    AdministrationIntern
    Guest

    Re: Attendance database programming

    Keith,

    Thanks for the advice. I actually heard the same thing from several others,
    so I have reformatted the attendance database to do exactly what you are
    saying. Dates going down in Column A and Names going across the top row.

    A friend has helped with some formatting and writing of formulas for the
    rolling calendar, but I'd like to hear what you suggest. For the rolling
    calendar, I'd like it to count backwards. So, in August of 2006, I'd like to
    see the database tally totals from August 06, July 06, June 06, May 06, April
    06, March 06, Feb 06, Jan 06, Dec 05, Nov 05, Oct 05, Sept 05. Does this make
    sense?

    Oh and the reason why I began mid-month is because this is when the new
    attendance policy is being formally introduced, this Friday, July 14th.

    Also, when this database is introduced, it doesn't mean that previous
    attendance totals from before will be erased. The company would still like to
    factor in whatever present totals are for each employee. So is there a way to
    do this? I assume that what needs to happen is that the calendar needs to
    start a full year previous to this one. And the managers would input the
    absences from the previous year. But then, for example, on July 14th, 2006,
    the totals from before August 14th, 05 would not be counted. Is there a way
    to do this too?

    Thank you in advance for all of your help.

    -Angie

    "KR" wrote:

    > Angie-
    >
    > If I were setting this up from scratch, I would probably put the dates in
    > Column A, and the names across the top (assuming you don't have over ~200
    > people).
    >
    > By having all the dates (365/year) even if you don't use them all, you have
    > several options:
    > (1) you could use an employee total on a rolling 365 days, giving you a
    > true, accurate rolling total with a simple formula, and
    > (2) if you need quarterly summary data (although your date ranges seem
    > unusual, I've never seen a company with quarters that start in the middle of
    > the month) you could adjust your formula to only include the months of
    > interest.
    >
    > You would no longer need to worry about multiple sheets, or adding sheets
    > each quarter and updating your formulas to reference them.
    >
    > If you decide to go this route, re-post and I'd be glad to help you with the
    > 365 day rolling formula (based on brilliant work from others in this group)
    >
    > Thanks,
    > Keith
    >
    > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > wrote in message news:49EB6BDF-E0DA-4F82-A843-38542547D83A@microsoft.com...
    > > Alf,
    > >
    > > Yes, sorry for not being clear before.
    > >
    > > As for the date, it is a daily thing. So yes, it would proceed as

    > 7/14/2006.
    > > Then 7/15/2006. Then 7/16/2006.
    > >
    > > Also, after the end of this current year, I think new worksheets would be
    > > added. This is only for the ease of the people inputting the data - so

    > they
    > > wouldn't have to go and clear old information out.
    > >
    > > Does this make sense?
    > >
    > > -Angie
    > >
    > >
    > > "Alf Bryn" wrote:
    > >
    > > > Thanks for clarification. I see now that did not understand what you

    > wanted
    > > > to do.
    > > >
    > > > I'm sorry that I can't help you with your problem. My advice to you if

    > you
    > > > don't get any help is to repost your problem in 3 to 4 days describing

    > in
    > > > detail what you want to do.
    > > >
    > > > A cople of quick questions. The date column in the "Q1" is this dayly

    > basis?
    > > > I.e first date column is July 14th, the next July 15th and so forth or

    > is it
    > > > done in some other formate?
    > > >
    > > > After a year do you plan to uppdate "Q1" with "new" data or are you

    > adding a
    > > > new sheet?
    > > >
    > > > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > > > wrote in message

    > news:CFCCC627-F19C-44A7-BB57-38886BE04C07@microsoft.com...
    > > > > Alf,
    > > > >
    > > > > Thanks for your reply. Not quite sure I understand your

    > recommendations
    > > > > because I am VERY new to Excel.
    > > > >
    > > > > Let me clarify how the database is set up. Currently, there are 5
    > > > > worksheets. The first is a "Year-to-Date". The next four worksheets

    > are
    > > > > for
    > > > > each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".
    > > > >
    > > > > The policy is going to begin July 14th, so in Qtr1 worksheet, it

    > begins on
    > > > > July 14th and goes until October 13th. Qtr2 worksheet begins with

    > October
    > > > > 14th and goes until Jan 13th. I have my dates going across the top,

    > and
    > > > > the
    > > > > employee names going down the side. The "Year-to-Date" worksheet sums

    > up
    > > > > the
    > > > > four quarters.
    > > > >
    > > > > So my question is whether or not I'll be able to sum absences for a 12
    > > > > month
    > > > > basis. So in July of 2006, the number of absences from June 05 would

    > not
    > > > > be
    > > > > counted. Similarly, in August of 2006, the number of absences from

    > July 05
    > > > > would not be counted.
    > > > >
    > > > > Does this make sense?
    > > > >
    > > > > Thank you in advance for any help that you may be able to give.
    > > > >
    > > > > -Angie
    > > > >
    > > > > "Alf Bryn" wrote:
    > > > >
    > > > >> Not sure I understood your problem righ but perhaps you could do
    > > > >> something
    > > > >> like this.
    > > > >>
    > > > >> Sub Auto_Open()
    > > > >>
    > > > >> '
    > > > >> Dim i As Integer
    > > > >> Application.DisplayAlerts = False
    > > > >> For i = Sheets.Count To 12 Step -1
    > > > >>
    > > > >> If i > 13 Then
    > > > >> Sheets(i).Delete
    > > > >> End If
    > > > >> Next i
    > > > >> Application.DisplayAlerts = True
    > > > >>
    > > > >> End Sub
    > > > >>
    > > > >> This assumes that the oldest sheet is the last one in the row of

    > sheets.
    > > > >>
    > > > >> "AdministrationIntern"

    > <AdministrationIntern@discussions.microsoft.com>
    > > > >> wrote in message
    > > > >> news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    > > > >> >I am creating an attendance database for my company.
    > > > >> >
    > > > >> > There are 19 different departments in the company and each manager
    > > > >> > tallies
    > > > >> > his/her own employee attendances.
    > > > >> >
    > > > >> > I had a spreadsheet set up, but it wasn't on a rolling calendar

    > basis.
    > > > >> > Then,
    > > > >> > I was going to have the managers delete old months, but that would

    > most
    > > > >> > likely mess with the formulas.
    > > > >> >
    > > > >> > So the new spreadsheet needs to be on a rolling calendar basis, so

    > that
    > > > >> > when
    > > > >> > a new month comes up, the previous month from last year will drop

    > off
    > > > >> > in
    > > > >> > calculations.
    > > > >> >
    > > > >> > My file has three worksheets, one titled "Summary", one titled
    > > > >> > "Details"
    > > > >> > and
    > > > >> > the last "Setup".
    > > > >> >
    > > > >> > The Summary page should tally the total absences from the year for

    > each
    > > > >> > employee. It serves as a quick view. The Details page is where
    > > > >> > Managers
    > > > >> > enter information about each individual employee, each day they are
    > > > >> > late,
    > > > >> > or
    > > > >> > don't show up for work. What I would like to do on the set-up page

    > is
    > > > >> > to
    > > > >> > create a reference start date, so the Details page can reference

    > this
    > > > >> > and
    > > > >> > add
    > > > >> > 365 days...and sum the number of absences within that range. I

    > don't
    > > > >> > know
    > > > >> > how
    > > > >> > to do this. How should the sheets be set up. Can someone please

    > help?
    > > > >> >
    > > > >> > Thank you.
    > > > >> >
    > > > >>
    > > > >>
    > > > >>
    > > >
    > > >
    > > >

    >
    >
    >


  8. #8
    KR
    Guest

    Re: Attendance database programming

    If I understand correctly, your primary concern is getting a rolling total;
    if you need monthly totals as well, that could easily be added to your
    sheet.

    If you want this annual rolling average to be useful, you will need to
    backload your old data, e.g. start your first row at exactly 12 months ago,
    and fill in the history for each employee. Without doing so, there is no
    (easy) way to calculate your rolling number on a daily basis. With some
    effort, you could factor in (probably from a different sheet) a historical
    number of absences per month, but whatever the level of resolution of your
    back-data will be the best level of resolution you can get from your
    output...so if you only backload months, then your 12-mo rolling will only
    be accurate to the month- and it would require a different sheet setup.

    Assuming you back-load daily data, here is how I would set it up, prefixed
    with the row # (don't actually add that to your sheet):
    A B C
    1 Formula Formula
    2 Name1 Name2 etc
    3 Date
    4 Date
    etc

    so at this point, you just need to know what the current date is (last used
    row, whether it has data in it or not), and sum the last 365 rows ending
    with that final row. I don't have my references with me, so I'll have to
    post more details on getting the last row tomorrow, but once you have that,
    the rest is essentially:
    =SUM(OFFSET(B431,-364,0,365,1)) if today's date is in A431
    Now instead of B431, we need to insert the moving cell reference for that
    column that containts the current date.

    You can ultimately get the row by putting =int(now()) in A1 and formatting
    it to match how you enter your dates (you have to pull of the time), then
    use the match function to find the same entry in A:A. Then build that in
    with an indirect function... so something like...
    =SUM(OFFSET(INDIRECT("B" & match(A1, A2:A10000,False),-364,0,365,1))
    where you would just change the B to C (to D, etc) for each column.
    I haven't tested this yet to verify. It may give you enough of a lead to
    start with, and post back if you get stuck.

    This does give you a true 365 day rolling average; if you decide you only
    want it on a monthly basis, then post back and I can give some suggestions
    on how to do that instead.

    Best,
    Keith


    "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    wrote in message news:A3DA6D7A-DE6B-4A76-BE03-E6C9412415B1@microsoft.com...
    > Keith,
    >
    > Thanks for the advice. I actually heard the same thing from several

    others,
    > so I have reformatted the attendance database to do exactly what you are
    > saying. Dates going down in Column A and Names going across the top row.
    >
    > A friend has helped with some formatting and writing of formulas for the
    > rolling calendar, but I'd like to hear what you suggest. For the rolling
    > calendar, I'd like it to count backwards. So, in August of 2006, I'd like

    to
    > see the database tally totals from August 06, July 06, June 06, May 06,

    April
    > 06, March 06, Feb 06, Jan 06, Dec 05, Nov 05, Oct 05, Sept 05. Does this

    make
    > sense?
    >
    > Oh and the reason why I began mid-month is because this is when the new
    > attendance policy is being formally introduced, this Friday, July 14th.
    >
    > Also, when this database is introduced, it doesn't mean that previous
    > attendance totals from before will be erased. The company would still like

    to
    > factor in whatever present totals are for each employee. So is there a way

    to
    > do this? I assume that what needs to happen is that the calendar needs to
    > start a full year previous to this one. And the managers would input the
    > absences from the previous year. But then, for example, on July 14th,

    2006,
    > the totals from before August 14th, 05 would not be counted. Is there a

    way
    > to do this too?
    >
    > Thank you in advance for all of your help.
    >
    > -Angie
    >
    > "KR" wrote:
    >
    > > Angie-
    > >
    > > If I were setting this up from scratch, I would probably put the dates

    in
    > > Column A, and the names across the top (assuming you don't have over

    ~200
    > > people).
    > >
    > > By having all the dates (365/year) even if you don't use them all, you

    have
    > > several options:
    > > (1) you could use an employee total on a rolling 365 days, giving you a
    > > true, accurate rolling total with a simple formula, and
    > > (2) if you need quarterly summary data (although your date ranges seem
    > > unusual, I've never seen a company with quarters that start in the

    middle of
    > > the month) you could adjust your formula to only include the months of
    > > interest.
    > >
    > > You would no longer need to worry about multiple sheets, or adding

    sheets
    > > each quarter and updating your formulas to reference them.
    > >
    > > If you decide to go this route, re-post and I'd be glad to help you with

    the
    > > 365 day rolling formula (based on brilliant work from others in this

    group)
    > >
    > > Thanks,
    > > Keith
    > >
    > > "AdministrationIntern" <AdministrationIntern@discussions.microsoft.com>
    > > wrote in message

    news:49EB6BDF-E0DA-4F82-A843-38542547D83A@microsoft.com...
    > > > Alf,
    > > >
    > > > Yes, sorry for not being clear before.
    > > >
    > > > As for the date, it is a daily thing. So yes, it would proceed as

    > > 7/14/2006.
    > > > Then 7/15/2006. Then 7/16/2006.
    > > >
    > > > Also, after the end of this current year, I think new worksheets would

    be
    > > > added. This is only for the ease of the people inputting the data - so

    > > they
    > > > wouldn't have to go and clear old information out.
    > > >
    > > > Does this make sense?
    > > >
    > > > -Angie
    > > >
    > > >
    > > > "Alf Bryn" wrote:
    > > >
    > > > > Thanks for clarification. I see now that did not understand what you

    > > wanted
    > > > > to do.
    > > > >
    > > > > I'm sorry that I can't help you with your problem. My advice to you

    if
    > > you
    > > > > don't get any help is to repost your problem in 3 to 4 days

    describing
    > > in
    > > > > detail what you want to do.
    > > > >
    > > > > A cople of quick questions. The date column in the "Q1" is this

    dayly
    > > basis?
    > > > > I.e first date column is July 14th, the next July 15th and so forth

    or
    > > is it
    > > > > done in some other formate?
    > > > >
    > > > > After a year do you plan to uppdate "Q1" with "new" data or are you

    > > adding a
    > > > > new sheet?
    > > > >
    > > > > "AdministrationIntern"

    <AdministrationIntern@discussions.microsoft.com>
    > > > > wrote in message

    > > news:CFCCC627-F19C-44A7-BB57-38886BE04C07@microsoft.com...
    > > > > > Alf,
    > > > > >
    > > > > > Thanks for your reply. Not quite sure I understand your

    > > recommendations
    > > > > > because I am VERY new to Excel.
    > > > > >
    > > > > > Let me clarify how the database is set up. Currently, there are 5
    > > > > > worksheets. The first is a "Year-to-Date". The next four

    worksheets
    > > are
    > > > > > for
    > > > > > each quarter "Qtr1" "Qtr2" "Qtr3" and "Qtr4".
    > > > > >
    > > > > > The policy is going to begin July 14th, so in Qtr1 worksheet, it

    > > begins on
    > > > > > July 14th and goes until October 13th. Qtr2 worksheet begins with

    > > October
    > > > > > 14th and goes until Jan 13th. I have my dates going across the

    top,
    > > and
    > > > > > the
    > > > > > employee names going down the side. The "Year-to-Date" worksheet

    sums
    > > up
    > > > > > the
    > > > > > four quarters.
    > > > > >
    > > > > > So my question is whether or not I'll be able to sum absences for

    a 12
    > > > > > month
    > > > > > basis. So in July of 2006, the number of absences from June 05

    would
    > > not
    > > > > > be
    > > > > > counted. Similarly, in August of 2006, the number of absences from

    > > July 05
    > > > > > would not be counted.
    > > > > >
    > > > > > Does this make sense?
    > > > > >
    > > > > > Thank you in advance for any help that you may be able to give.
    > > > > >
    > > > > > -Angie
    > > > > >
    > > > > > "Alf Bryn" wrote:
    > > > > >
    > > > > >> Not sure I understood your problem righ but perhaps you could do
    > > > > >> something
    > > > > >> like this.
    > > > > >>
    > > > > >> Sub Auto_Open()
    > > > > >>
    > > > > >> '
    > > > > >> Dim i As Integer
    > > > > >> Application.DisplayAlerts = False
    > > > > >> For i = Sheets.Count To 12 Step -1
    > > > > >>
    > > > > >> If i > 13 Then
    > > > > >> Sheets(i).Delete
    > > > > >> End If
    > > > > >> Next i
    > > > > >> Application.DisplayAlerts = True
    > > > > >>
    > > > > >> End Sub
    > > > > >>
    > > > > >> This assumes that the oldest sheet is the last one in the row of

    > > sheets.
    > > > > >>
    > > > > >> "AdministrationIntern"

    > > <AdministrationIntern@discussions.microsoft.com>
    > > > > >> wrote in message
    > > > > >> news:894BB417-5D84-4BF1-899B-66AFD9B16C61@microsoft.com...
    > > > > >> >I am creating an attendance database for my company.
    > > > > >> >
    > > > > >> > There are 19 different departments in the company and each

    manager
    > > > > >> > tallies
    > > > > >> > his/her own employee attendances.
    > > > > >> >
    > > > > >> > I had a spreadsheet set up, but it wasn't on a rolling calendar

    > > basis.
    > > > > >> > Then,
    > > > > >> > I was going to have the managers delete old months, but that

    would
    > > most
    > > > > >> > likely mess with the formulas.
    > > > > >> >
    > > > > >> > So the new spreadsheet needs to be on a rolling calendar basis,

    so
    > > that
    > > > > >> > when
    > > > > >> > a new month comes up, the previous month from last year will

    drop
    > > off
    > > > > >> > in
    > > > > >> > calculations.
    > > > > >> >
    > > > > >> > My file has three worksheets, one titled "Summary", one titled
    > > > > >> > "Details"
    > > > > >> > and
    > > > > >> > the last "Setup".
    > > > > >> >
    > > > > >> > The Summary page should tally the total absences from the year

    for
    > > each
    > > > > >> > employee. It serves as a quick view. The Details page is where
    > > > > >> > Managers
    > > > > >> > enter information about each individual employee, each day they

    are
    > > > > >> > late,
    > > > > >> > or
    > > > > >> > don't show up for work. What I would like to do on the set-up

    page
    > > is
    > > > > >> > to
    > > > > >> > create a reference start date, so the Details page can

    reference
    > > this
    > > > > >> > and
    > > > > >> > add
    > > > > >> > 365 days...and sum the number of absences within that range. I

    > > don't
    > > > > >> > know
    > > > > >> > how
    > > > > >> > to do this. How should the sheets be set up. Can someone please

    > > help?
    > > > > >> >
    > > > > >> > Thank you.
    > > > > >> >
    > > > > >>
    > > > > >>
    > > > > >>
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1