ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is weekday? (https://www.excelbanter.com/excel-programming/370523-weekday.html)

Arne Hegefors

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!

Special-K[_5_]

Is weekday?
 

=WEEKDAY(A1)

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


--
Special-K


------------------------------------------------------------------------
Special-K's Profile: http://www.excelforum.com/member.php...fo&userid=7470
View this thread: http://www.excelforum.com/showthread...hreadid=572148


Bob Phillips

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" wrote in message
...
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!





All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com