+ Reply to Thread
Results 1 to 3 of 3

Is weekday?

Hybrid View

  1. #1
    Arne Hegefors
    Guest

    Is weekday?

    Hi! I have a small problem. In my Excel macro I want to check if a certain
    date that exists in an array is a weekday (Saturday or Sunday). My
    excel-version is in Swedish so I do not know how to do this in my VBA macro.
    In Excel there is a function (in Swedish) that is like this =DATE(“a1”). It
    returns a number depending on what day is entered in cell a1. That is what I
    want to do in my macro. Please help me! Many thanks in advance!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078
    =WEEKDAY(A1)

    returns a number 1 to 7 indicating what day it is.
    Sun = 1, Mon = 2, Wed = 3 etc
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Bob Phillips
    Guest

    Re: Is weekday?

    =VECKODAG(A1;2)>5

    shows TRUE if Sat or Sun

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Arne Hegefors" <ArneHegefors@discussions.microsoft.com> wrote in message
    news:6C350B69-9FA7-457B-8DC3-78613C61C333@microsoft.com...
    > Hi! I have a small problem. In my Excel macro I want to check if a certain
    > date that exists in an array is a weekday (Saturday or Sunday). My
    > excel-version is in Swedish so I do not know how to do this in my VBA

    macro.
    > In Excel there is a function (in Swedish) that is like this =DATE("a1").

    It
    > returns a number depending on what day is entered in cell a1. That is what

    I
    > want to do in my macro. Please help me! Many thanks in advance!




+ 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