#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEEKDAY() function: display TEXT not numeric weekday tom Excel Discussion (Misc queries) 3 November 21st 06 04:32 PM
Weekday LB79 Excel Worksheet Functions 2 July 28th 06 02:59 PM
Weekday Darts via OfficeKB.com Excel Discussion (Misc queries) 3 May 26th 06 06:26 PM
Weekday Thomas Excel Worksheet Functions 6 January 29th 06 01:07 AM
WEEKDAY using IF lunker55 Excel Discussion (Misc queries) 2 December 4th 04 03:34 PM


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"