+ Reply to Thread
Results 1 to 10 of 10

first saturday in a month

  1. #1
    Barry
    Guest

    first saturday in a month

    I need a formula to find the first saturday in the month. i.e. cell a1
    contains the date 2006 02 01, i need to know the first saturday in feb.

  2. #2
    bpeltzer
    Guest

    RE: first saturday in a month

    This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)

    "Barry" wrote:

    > I need a formula to find the first saturday in the month. i.e. cell a1
    > contains the date 2006 02 01, i need to know the first saturday in feb.


  3. #3
    Gary L Brown
    Guest

    RE: first saturday in a month

    Chip Pearson's web site...
    http://www.cpearson.com/excel/datetime.htm#NthDoW
    answers this for both a formula and using VBA.

    HTH,
    --
    Gary Brown
    gary_brown@ge_NOSPAM.com
    If this post was helpful, please click the ''Yes'' button next to ''Was this
    Post Helpfull to you?''.


    "Barry" wrote:

    > I need a formula to find the first saturday in the month. i.e. cell a1
    > contains the date 2006 02 01, i need to know the first saturday in feb.


  4. #4
    Ron Rosenfeld
    Guest

    Re: first saturday in a month

    On Mon, 6 Feb 2006 13:32:13 -0800, "Barry" <Barry@discussions.microsoft.com>
    wrote:

    >I need a formula to find the first saturday in the month. i.e. cell a1
    >contains the date 2006 02 01, i need to know the first saturday in feb.


    If your date in A1 is always the first day of the month, then:

    =A1+7-WEEKDAY(A1)

    will give you the first Saturday of the month.

    If the date in A1 can be any date in the month, the first Saturday of that
    month will be given by:

    =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+1)


    --ron

  5. #5
    Sandy Mann
    Guest

    Re: first saturday in a month

    "bpeltzer" <bpeltzer.deletethissuffix@cox.net> wrote in message
    news:C3FC1F84-47D7-4181-844A-480C55E7CAA4@microsoft.com...
    > This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)
    >

    Are you sure? It doesn't seem to work for me for all dates but

    =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+8,1)

    seems to work OK

    --
    HTH

    Sandy
    sandymann2@mailinator.com
    Replace@mailinator.com with @tiscali.co.uk


    "bpeltzer" <bpeltzer.deletethissuffix@cox.net> wrote in message
    news:C3FC1F84-47D7-4181-844A-480C55E7CAA4@microsoft.com...
    > This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)
    >
    > "Barry" wrote:
    >
    >> I need a formula to find the first saturday in the month. i.e. cell a1
    >> contains the date 2006 02 01, i need to know the first saturday in feb.





  6. #6
    bpeltzer
    Guest

    Re: first saturday in a month

    Thanks, you're right. =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+1,1) gets it.
    The logic, BTW: Get to the first day of the month-- a2-day(a2)+1 -- and
    make an adjustment based on the weekday that the first of the month falls on
    -- 7-weekday(a2-day(a2)+1,1) --. The adjustment adds 0 if the first is
    Saturday, 1 on Friday, etc.
    --Bruce

    "Sandy Mann" wrote:

    > "bpeltzer" <bpeltzer.deletethissuffix@cox.net> wrote in message
    > news:C3FC1F84-47D7-4181-844A-480C55E7CAA4@microsoft.com...
    > > This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)
    > >

    > Are you sure? It doesn't seem to work for me for all dates but
    >
    > =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+8,1)
    >
    > seems to work OK
    >
    > --
    > HTH
    >
    > Sandy
    > sandymann2@mailinator.com
    > Replace@mailinator.com with @tiscali.co.uk
    >
    >
    > "bpeltzer" <bpeltzer.deletethissuffix@cox.net> wrote in message
    > news:C3FC1F84-47D7-4181-844A-480C55E7CAA4@microsoft.com...
    > > This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)
    > >
    > > "Barry" wrote:
    > >
    > >> I need a formula to find the first saturday in the month. i.e. cell a1
    > >> contains the date 2006 02 01, i need to know the first saturday in feb.

    >
    >
    >
    >


  7. #7
    Barry
    Guest

    Re: first saturday in a month

    Thanks very much ron.

    "Ron Rosenfeld" wrote:

    > On Mon, 6 Feb 2006 13:32:13 -0800, "Barry" <Barry@discussions.microsoft.com>
    > wrote:
    >
    > >I need a formula to find the first saturday in the month. i.e. cell a1
    > >contains the date 2006 02 01, i need to know the first saturday in feb.

    >
    > If your date in A1 is always the first day of the month, then:
    >
    > =A1+7-WEEKDAY(A1)
    >
    > will give you the first Saturday of the month.
    >
    > If the date in A1 can be any date in the month, the first Saturday of that
    > month will be given by:
    >
    > =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+1)
    >
    >
    > --ron
    >


  8. #8
    Barry
    Guest

    RE: first saturday in a month

    Thanks, Ron's suggestion seems to work best.

    "bpeltzer" wrote:

    > This seems to work: =a1-DAY(a1)+8-WEEKDAY(a1)
    >
    > "Barry" wrote:
    >
    > > I need a formula to find the first saturday in the month. i.e. cell a1
    > > contains the date 2006 02 01, i need to know the first saturday in feb.


  9. #9
    Ron Rosenfeld
    Guest

    Re: first saturday in a month

    On Tue, 7 Feb 2006 05:31:23 -0800, "Barry" <Barry@discussions.microsoft.com>
    wrote:

    >Thanks very much ron.
    >


    You're welcome. Glad to help.


    --ron

  10. #10
    Registered User
    Join Date
    07-07-2016
    Location
    US
    MS-Off Ver
    2010
    Posts
    1

    Re: first saturday in a month

    Ron's suggestion for > If the date in A1 can be any date in the month, the first Saturday of that
    > month will be given by:
    >
    > =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+1)

    Isn't that the same as A1-DAY(A1)+7-WEEKDAY(A1-DAY(A1))?

    if you add 7 to the first day of the month and then subtract the weekday of
    the first day wouldn't that be the same as adding 8 to the first day of the month
    and then subtracting the weekday of the second day of the month?

+ Reply to 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