Is weekday?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
=WEEKDAY(A1)

returns a number 1 to 7 indicating what day it is.
Sun = 1, Mon = 2, Wed = 3 etc
 
=VECKODAG(A1;2)>5

shows TRUE if Sat or Sun

--
HTH

Bob Phillips

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