+ Reply to Thread
Results 1 to 6 of 6

If function combined with weekday

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Indiana, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    If function combined with weekday

    Ok here is my problem. The formula below Tests Cell A7 and displays the previous Saturday of that week if the Date in the A7 is Ahead of Saturday in that week. Example.
    01/01/2013 "Tuesday", it will display 12/29/2012 "Saturday". My problem is with the "NOW()" function I want the formual to Test "NOW()" and if it does not Equal the Given Saturday Date Run the Formula to Display the appropiate Date Requested,

    Here is my formula:

    =IF(WEEKDAY(A7)=7,NOW(),A7-WEEKDAY(A7,1))


    This formula works fine as is, but I want to modify it to Test if "NOW()" is 7 (aka Saturday) and if it is Saturday Leave it alone but if it's not Saturday List Saturday's Date from that week.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If function combined with weekday

    did you tried weekday(now()) to check?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: If function combined with weekday

    I used today() in b3
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-10-2013
    Location
    Indiana, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If function combined with weekday

    @ vlady Thats my problem I'm not sure where to put in the Logic for this equation.

    @rcm I tried that and it includes the Saturday but any day past it list the Following Saturday instead of the previous I tried Switching the Value of "B3" to negative and it can't process the result. No error message it just can't process it.

    IF(WEEKDAY(B3)=7,0,7-WEEKDAY(B3))-B3

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If function combined with weekday

    maybe this???

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: If function combined with weekday

    I'm confused with what you want to do? You have a date in A7 (or B3) and you are testing that date, but also NOW() - are you looking at two different dates or is A7 = NOW()?
    Audere est facere

+ 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