+ Reply to Thread
Results 1 to 7 of 7

Days between a period!

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Days between a period!

    Hi All,

    Hope all is well.

    I would like to ask for some suggestions concerning formulas with dates.

    Basically I have an excel where:
    - on cell A1, I insert a date e.g. 01.01.2016 a
    - on cell A2, I insert a second date, e.g. 05.01.2016
    - on cell A3, I insert the day of the week, e.g. Monday

    I would like to insert a formula in cell A4 which can be dragged throughout and which, when dragged,would fill the other cells with all Mondays falling due between cell A1 and A2.

    Do you have any suggestions or ideas for the above if this can be done?

    Appreciate a lot your kind help!

    Thanks

    Keibri

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

    Re: Days between a period!

    If in A3 you enter number (1,2,3...7 for Mon, Tue, ... Sun respectively) then you could use:

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


    confirmed with ctrl+shift+enter (not just enter)

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

    Re: Days between a period!

    Sorry, this will give you just number of how many monday there is.

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

    Re: Days between a period!

    This will give you all mondays:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Days between a period!

    Amazing!! That's really really helpful and what I was looking for !!!

    I am not sure if maybe I am asking too much but would it also be possible to to the same depending on the what data you put in cell A3. E.g. Cell A3, can be any other day of the week? (Monday, Tuesday, Wednesday etc)

    Not sure if i am asking too much but thanks a lot for your kind help!! Really appreciate it!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Days between a period!

    Quote Originally Posted by zbor View Post
    This will give you all mondays:

    =IF($A$1-WEEKDAY($A$1, 3)+7*ROWS(A$4:A4)-7<=$A$2, $A$1-WEEKDAY($A$1, 3)+7*ROWS(A$4:A4)-7, "")
    What am I doing wrong?

    Formula entered in A4 and copied down.

    Dates are M/D/Y format.

    Data Range
    A
    B
    1
    1/1/2016
    Fri
    2
    1/5/2016
    Tue
    3
    4
    12/28/2015
    Mon
    5
    1/4/2016
    Mon
    6
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Days between a period!

    Hi Thanks Tony and zbor!

    it works awesome!! Thanks a lot!

    I was just wondering, if possible, if I need to insert Tuesday instead of Monday, how would the formula change please?

    Really great thanks!

+ 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] Need to count how many days in week period, if period starts mid week?
    By mrsdeapsleap in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2016, 03:29 AM
  2. [SOLVED] Finding peak days of the within a period
    By Shellybelly in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-24-2016, 04:18 PM
  3. Replies: 0
    Last Post: 06-11-2015, 03:12 AM
  4. Count number of days between a period
    By amurray2307 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2013, 05:40 AM
  5. [SOLVED] Number of days within a period
    By nicholas.jacka in forum Excel General
    Replies: 1
    Last Post: 10-25-2012, 06:17 AM
  6. Days to months and sum for period
    By Salomey in forum Excel General
    Replies: 4
    Last Post: 09-14-2010, 11:33 AM
  7. [SOLVED] Days in month for 10 year period
    By Geoff in forum Excel General
    Replies: 4
    Last Post: 05-06-2005, 12:06 PM

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