+ Reply to Thread
Results 1 to 11 of 11

Peak days for leave taken

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Cool Peak days for leave taken

    Hi all,

    I have a month and a year in cell I1, i have a row with days of the week (Mon - Sun) for 31 days in E2:AI2, i have a row witch is numbered from 1-31 (E3:AI3) and finally i have a row (E4:AI4)where i enter the letter "S" for sick leave. The month (I1) automatically populates the row for mon - sun (E2:AI2). How can i get the peak day of the week (mon - sun) that leave was taken? I.o.w if a person likes to take sick leave on mondays, it must show me the peak day (mon) in cell AQ4. It must look in all the days leave was taken and give me the peak day for that leave witch will me monday.

    Thank you in advance for your help.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Peak days for leave taken

    Upload example workbook.

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    3 - Leave.zipHere you go.

  4. #4
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    Please don't update the links.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Peak days for leave taken

    I'm not sure what you looking for...

    This will return last day with "s".

    =LOOKUP(2, 1/(LEAVE!$E4:$AI4="s"), LEAVE!$E$2:$AI$2)

    But I'm not sure what you mean by peak day.

  6. #6
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    I someone likes to take sick leave on mondays more than other days of the week, it must return the value Mon. I want to know for witch day of the week the person took the most sick (S) leave. Does this make sence??

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Peak days for leave taken

    Here, try this:

    Please Login or Register  to view this content.
    comfirmed with ctrl+shift+enter

    Edit: in case of few same days this will return first one

  8. #8
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    Almost there. If there is 3 "S" on monday and 4 on saturday it must return the value of Sat. The day with the most S's must win and produce that specific day. If i use the above formula and put "S" on Wed, it gives me "Wed", and if i continue on and put "S" on each Sat, it still shows "Wed".

    Thanx for your help so far. I'm just so tired of thinking.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Peak days for leave taken

    I manage to make this with extra row.
    I couldn't find better place than putting it in Data Sheet instead of 1's...

    (also, I need to change formula in 2nd row and to delete most of the workbook to reduce size).
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    Thank you so much. I really needed those 1's but ill see if i can work around that. Thanx a 1000000!!

  11. #11
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    Re: Peak days for leave taken

    Thank you. It worked. I just copied your data sheet into my workbook and now i use both data sheets for my work.

    Thanx!!

+ 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