Closed Thread
Results 1 to 7 of 7

insert first sunday

  1. #1
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119

    insert first sunday

    Hi,
    How is possible to insert the first sunday date into a cell (A11)based on another cell (F2)which indicate the month. I am attaching the file with this . example June 2007 the first sunday date is 03/06/2007. i need to insert it with a formula. Please help me.
    thanks and regards
    nowfal
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Ignoring your speadsheet (sorry), I thinlk this formula returns the date of the first Sunday on or after the specified date:

    =A1 + MATCH(TRUE, WEEKDAY(A1 + ROW($1:$7) - 1) = 1, 0) - 1

  3. #3
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119
    thats not working N/A message

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    I note that F2 displays "June 2007" but actually contains the date 30th June 2007 so if you want to show the first Sunday of a month when F2 contains any day within that month try this formula

    =F2-DAY(F2)+8-WEEKDAY(F2-DAY(F2))

    format cell in required date format

  5. #5
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119
    Hi daddylonglegs, your formula works perfect. thats great. thanks alot.

  6. #6
    Registered User
    Join Date
    02-21-2015
    Location
    Salt Lake County, UT
    MS-Off Ver
    Microsoft Office 365
    Posts
    42

    Re: insert first sunday

    Hi, I saw the post which was what I was looking for but there's one thing which is causing a problem for me. some months has five sundays and others has four; I'm trying to avoid that thing. Please see the attached file for more sense-able understanding

    Any suggestions how can I fix that?

    Attachment 776213

  7. #7
    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. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,796

    Re: insert first sunday

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    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.

Closed 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