+ Reply to Thread
Results 1 to 3 of 3

Weekday formula whats wrong

  1. #1
    Forum Contributor
    Join Date
    09-15-2005
    Location
    Florida
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    142

    Weekday formula whats wrong

    Hello Expert,

    I don't understand why the following formula is not working. I tried server versions.
    Would like an out put of only weekend Saturdays and another one for Sundays

    Saturday

    =SUMPRODUCT(--(HOUR([Report114.xls]Report1!$L$5:$L$50000)>=ROW(A1))*(HOUR([Report114.xls]Report1!$L$5:$L$50000)<ROW(A2))*([Report114.xls]Report1!$O$5:$O$50000="service_desk")*([Report114.xls]Report1!$F$5:$F$50000="Phone")*WEEKDAY([Report114.xls]Report1!$L$5:$L$50000)=6)

    Sunday

    =SUMPRODUCT(--(HOUR([Report114.xls]Report1!$L$5:$L$50000)>=ROW(A1))*(HOUR([Report114.xls]Report1!$L$5:$L$50000)<ROW(A2))*([Report114.xls]Report1!$O$5:$O$50000="service_desk")*([Report114.xls]Report1!$F$5:$F$50000="Phone")*WEEKDAY([Report114.xls]Report1!$L$5:$L$50000)=7)

    I also tried >6 or >7 still no luck.

    Thanks in advanced.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Weekday formula whats wrong

    If you use WEEKDAY without (optional) second parameter it returns 1 for sun and 7 for sat
    May be you shall use =7 in first and = 1 in second formula
    as for trying to get weekend (Sat and Sun) use "european weekdays numbering" - second argument 2 in WEEKDAY
    WEEKDAY([Report114.xls]Report1!$L$5:$L$50000,2)>5)
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    09-15-2005
    Location
    Florida
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    142

    Re: Weekday formula whats wrong

    Hello Kaper,

    Thank you for your response, I have tried 7 and 1 and output is stuck on "0". I am thinking that the last argument, is not being taken into account. I noted that I was missing the "(" delimiter in the weekday argument and once entered formula was working.

    Again, thank you for reaching out.

    Cordially,

    Robert
    Last edited by rogrand; 02-05-2014 at 09:42 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can someone tell me whats wrong with this formula???
    By bopsgtir in forum Excel General
    Replies: 8
    Last Post: 07-29-2011, 01:23 PM
  2. Whats wrong with this formula?
    By blue-bullet in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2009, 06:51 AM
  3. Whats wrong with this formula?
    By Shane Moore in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-06-2006, 02:57 AM
  4. Whats Wrong With This Formula
    By curly88 in forum Excel General
    Replies: 3
    Last Post: 10-01-2006, 10:02 PM
  5. Whats wrong with my formula?
    By DKerr in forum Excel General
    Replies: 2
    Last Post: 09-05-2006, 07:02 AM

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