+ Reply to Thread
Results 1 to 3 of 3

Derive the the number of days based on the given date for the week

  1. #1
    Registered User
    Join Date
    05-18-2018
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    22

    Derive the the number of days based on the given date for the week

    Hi forum members,

    I need a formula to help me perform a function that returns the number of days based on the date for the week.
    For example,
    Cell A1: 22/6/18 (DATE)
    Cell A2: 3 (FORUMULA)

    So basically, i need a formula in cell a2 to calculate the the remaining number of days left for the week, including the day itself
    so the above example date is on a friday, thus cell a2 will have a value of 3 since there are 3 days left till sunday, which is the end of the week.

    Please help a me out!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,256

    Re: Derive the the number of days based on the given date for the week

    This will do what you want:

    =7-WEEKDAY(A1,11)+1

    However, when the date in question is a Sunday, it will return 1, so you could modify it thus:

    =IF(WEEKDAY(A1,11)=7,0,7-WEEKDAY(A1,11)+1)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,256

    Re: Derive the the number of days based on the given date for the week

    Thanks for the rep!

+ 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. [SOLVED] Calculate # days in week based on date range
    By Peelah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 07:01 PM
  2. [SOLVED] number of days between dates by week ending date
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-23-2015, 12:19 AM
  3. [SOLVED] Find week days within the date range and return number
    By CaineSmith in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-06-2014, 03:47 PM
  4. [SOLVED] Sum 7 days of information based on week ending date
    By tatyanamarie in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-18-2013, 07:22 AM
  5. Derive day of the week from date
    By jaZZerkill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2012, 05:13 AM
  6. week start date and end date based on week number
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 12:39 PM
  7. Replies: 1
    Last Post: 08-23-2005, 11:42 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