+ Reply to Thread
Results 1 to 4 of 4

Time Sheet Problem

  1. #1
    Registered User
    Join Date
    07-02-2007
    Posts
    3

    Time Sheet Problem

    Hello,
    This is my first post so go easy on me.
    I'm trying to make a time sheet for work,
    I've created a simple formula to add the 7 days
    of the weeks hours together
    which is as follows
    =SUM(F22, F25, F28, F31, F34, F37, F40)
    but say on a certain day I have a holiday (HOL)
    I'd like it to take this in consideration and
    make the formula add the hours up then
    add say "+1 DAY HOL" after the hours.
    I hope this makes sense.

    Cheers for any help.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =IF(COUNTIF(F22:F40,"Hol")>=1,SUM(F22,F25,F28,F31,F34,F37,F40)&" Hrs + "&COUNTIF(F22:F40,"Hol")&" DAY HOL",SUM(F22,F25,F28,F31,F34,F37,F40))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    07-02-2007
    Posts
    3
    Quote Originally Posted by VBA Noob
    Maybe

    =IF(COUNTIF(F22:F40,"Hol")>=1,SUM(F22,F25,F28,F31,F34,F37,F40)&" Hrs + "&COUNTIF(F22:F40,"Hol")&" DAY HOL",SUM(F22,F25,F28,F31,F34,F37,F40))

    VBA Noob
    Thank you, I'll try that :D

  4. #4
    Registered User
    Join Date
    07-02-2007
    Posts
    3
    Quote Originally Posted by VBA Noob
    Maybe

    =IF(COUNTIF(F22:F40,"Hol")>=1,SUM(F22,F25,F28,F31,F34,F37,F40)&" Hrs + "&COUNTIF(F22:F40,"Hol")&" DAY HOL",SUM(F22,F25,F28,F31,F34,F37,F40))

    VBA Noob
    Thank you, that works fine with 1 persons hours,
    but if I try to add this to another persons hours (there are 3 people on this sheet)
    it adds the Holidays to the other 2 people's hours.
    I've attached the sheet so you can see.
    Thanks for anymore help.

    Cheers.
    Attached Files Attached Files

+ 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