Is weekday?

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!
 
S

Special-K

=WEEKDAY(A1)

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

Bob Phillips

=VECKODAG(A1;2)>5

shows TRUE if Sat or Sun

--
HTH

Bob Phillips

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Not weekday 3
Calculate Payment Days and Date 3
Day of the week 1
Weekdays 5
convert spreadsheet formula into VBA formula 1
User Function. 1
Excel Calendar/Rota program problem 2
Scrolling and date matching 11

Top