+ Reply to Thread
Results 1 to 12 of 12

Dates of Sundays only

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Greece, NY
    MS-Off Ver
    365
    Posts
    61

    Question Dates of Sundays only

    Hi -

    I'm trying to create a schedule for shut-in visits which will happen on Sundays only. How do I create the dates of the Sundays in the first column? eg 1/5/2014, 1/12/2014, etc.

    If it can be done, can I then click on the cell handle to auto-populate the rest of the column?

    Thanks.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Dates of Sundays only

    Please see attached file with Sundays for 2014
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    12-27-2012
    Location
    Greece, NY
    MS-Off Ver
    365
    Posts
    61

    Re: Dates of Sundays only

    Wow! Thanks for the quick response. A couple of questions:

    1. Hiding the first column won't mess anything up, will it?

    2. For 2015, do I just search for 2014 and replace with 2015?

    Again, I appreciate your very quick help!

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Dates of Sundays only

    Quote Originally Posted by Nardar View Post
    Wow! Thanks for the quick response. A couple of questions:

    1. Hiding the first column won't mess anything up, will it?

    2. For 2015, do I just search for 2014 and replace with 2015?

    Again, I appreciate your very quick help!
    You're welcome

    Hiding first column is fine, just don't delete it.

    for 2015, just replace dates in column A and the formula will pick Sundays.

    Please don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dates of Sundays only

    well you could if you want to use that array formula without a helper put 1st of year in say b1
    as 1/1/2014
    then in a2 array entered and filled down

    =IFERROR(SMALL(IF(WEEKDAY(ROW(INDIRECT($B$1&":"&$B$1+366)))=1,ROW(INDIRECT($B$1&":"&$B$1+366)),""),ROWS($A$1:A1)),"")
    or alteratively
    put year in a1 as 2014
    a2 = =DATE($A$1, 1, MOD(7-DATE($A$1, 1, 1)+ 1,7)+1)
    a3 = =IF(YEAR(A2+7)>$A$1,"",A2+7) fill down to a54 (there can be a maximum of 53 sundays in a year)
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    12-27-2012
    Location
    Greece, NY
    MS-Off Ver
    365
    Posts
    61

    Re: Dates of Sundays only

    Martin - I don't understand what you're suggesting. I'm not familiar with much Excel terminology - what's the helper?

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Dates of Sundays only

    hi Nardar. from your opening post, it doesn't sound like you are extracting all the Sundays from a list of dates? it sounds like you just want all the Sundays of 2014?
    how about you just type the 1st Sunday date in A2 as 5Jan2014 or use a formula:
    =WORKDAY.INTL("31dec2013",1,"1111110")
    or:
    ="31dec2013"-WEEKDAY("31dec2013",2)+7

    you could also put the 1Jan2014 in say B1 & then use:
    =WORKDAY.INTL(B1-1,1,"1111110")
    =B1-1-WEEKDAY(B1-1,2)+7

    for the rest of the cells, simply use:
    =IFERROR(IF(YEAR(A2+7)=YEAR(A2),A2+7,""),"")

    change B1 to the year you want to change all the results. Martin is referring to Column A of the files above as the helper column. if you use the formulas we do, you don't have to create Column A & hide it. i created 4 columns inside for your choice. you can pick any of them
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,492

    Re: Dates of Sundays only

    We all know Excel start to count date from 01/01/1900, stored as 1. It was Sunday.
    To state the last Sunday of any date (i.e 1/1/2014) we use:
    =INT(DATE(2014,1,1)/7)*7+1
    and the next Sunday:
    =INT(DATE(2014,1,1)/7)*7+8

    Therefore, to create a list of Sundays of 2014 :
    A1=INT(DATE(2014,1,1)/7)*7+8
    A2=A1+7
    Drag down
    Quang PT

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Dates of Sundays only

    Hi bebo,

    I wish all machines would use 1/1/1900 as the start day of our systems. It seems Apple or some other OS's liked 1904 instead.

    When you assumed in "We all know" in your post above, your assumption was wrong if you include both PC and Apple OS.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,492

    Re: Dates of Sundays only

    MarvinP,
    You are right that some machines start to count from 1904.
    I am not familiar with 1904 OS and wondering if the formula cound work or not.
    Last edited by bebo021999; 01-08-2014 at 01:28 AM.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dates of Sundays only

    @Nardar a helper column/row is any row or column of data that you add in to help you get the data you need
    in that case the helper column was the list of all days in 2014

  12. #12
    Registered User
    Join Date
    03-02-2017
    Location
    MICHIGAN, USA
    MS-Off Ver
    14.7.1
    Posts
    1

    Re: Dates of Sundays only

    If I wanted to amend this slightly to have a third column with only Wednesdays in addition to the column of Sundays, what formula would I enter?

+ 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] Number of sundays between two dates
    By Carianne72 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2015, 11:57 AM
  2. Exclude Sundays between two dates
    By buffalobill in forum Excel General
    Replies: 4
    Last Post: 03-27-2010, 05:41 AM
  3. Dates Excluding Sundays
    By gailb14 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-07-2007, 12:16 PM
  4. How to calculate the # of Sundays between two dates
    By erict in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2007, 11:31 AM
  5. [SOLVED] calculation sundays between two dates
    By jeff thinkin in forum Excel General
    Replies: 3
    Last Post: 09-14-2005, 10:05 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