+ Reply to Thread
Results 1 to 8 of 8

display no of sundays and its date

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    display no of sundays and its date

    Hi,

    When i enter the first date of the month in excel column A,
    i should automatically get the date of all sundays of that month in remaining columns (B,C,D etc..)

    Thank u

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: display no of sundays and its date

    With
    A1: a first of month date.....01-Jan-2015

    This formula returns the first Sunday date of that month
    Please Login or Register  to view this content.
    and this formula, copied across to the right, returns the successive Sundays in that month
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2412
    Posts
    13,613

    Re: display no of sundays and its date

    This is a bit different approach.

    With the first days of the month in column A enter this array-entered formula in B1 fill down and across until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    A workbook is attached.
    Attached Files Attached Files
    Dave

  4. #4
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    Re: display no of sundays and its date

    Thank u very much.
    what changes we should do if we want to get other weekday ie monday or wednesday... as users choice?
    Last edited by santbiju1; 07-11-2015 at 08:23 AM.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2412
    Posts
    13,613

    Re: display no of sundays and its date

    In my formula change the "=1" to "=2" for Mondays and "=4" for Wednesdays, or better yet designate a "helper cell" (say H1) and then reference that helper with "=H1" and put the appropriate DOW number there. BTW: This assumes the reference type in the second argument of WEEKDAY is set to one.
    Last edited by FlameRetired; 07-11-2015 at 08:26 AM.

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: display no of sundays and its date

    In the formula I posted: =WORKDAY.INTL($A1-1,1,"1111110")
    In this section "1111110", 1's define non-workdays, beginning with Monday.
    In that example, Monday through Saturday are non-workdays...The zero represents Sunday (a work day)

    If you want to list Mondays...use this: "0111111"

    Does that help?

  7. #7
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    Re: display no of sundays and its date

    Above 2 solutions helps to solve my issues...Thanks a lot...

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: display no of sundays and its date

    A more flexible version of the formula I posted

    A1: a day to list....Monday
    A2: a first of the month date....01-Jan-2015

    This formula list the first date of the A1 day for that month
    Please Login or Register  to view this content.
    and this formula, copied across, lists the successive dates
    Please Login or Register  to view this content.
    Does that help?

+ 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] VBA Save a file with filename and last Sundays date.
    By Lady_Shaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2012, 06:36 PM
  2. [SOLVED] Date Formula - 1st,2nd & 3rd Sundays of each month
    By lsmft in forum Excel General
    Replies: 7
    Last Post: 11-02-2007, 05:47 AM
  3. Date Validation - Must equal Sundays date
    By jeridbohmann in forum Excel General
    Replies: 14
    Last Post: 11-30-2005, 04:45 PM
  4. Return Sundays date of current week
    By durex in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-13-2005, 11:37 AM
  5. Replies: 5
    Last Post: 09-29-2005, 02: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