Excel Macro Nightmares!
#1
Want to do something really simple:
Given a date, determine what day of the week it is.
Does VBA have a DayOf Week (dToday) type function, 'cos I can't find it!!!! [img]images/smilies/mad.gif[/img]
TIA,
Alex
Given a date, determine what day of the week it is.
Does VBA have a DayOf Week (dToday) type function, 'cos I can't find it!!!! [img]images/smilies/mad.gif[/img]
TIA,
Alex
#3
Used to work here!!
Join Date: Jun 2000
Location: Peterhead, Scotland
Posts: 1,488
Likes: 0
Received 0 Likes
on
0 Posts
You can convert this number to the day (Monday, Tuesday etc) by using the IF function, you can nest up to 7 IF functions together, so ideal for day of the week (you only need 6)
=if(weekday(DATE))=1,"Monday",if(weekday(DATE))=2, "Tuesday"......,"Saturday"))
Drop me an E-Mail if you need to know exactly how to do it.
Stuart
=if(weekday(DATE))=1,"Monday",if(weekday(DATE))=2, "Tuesday"......,"Saturday"))
Drop me an E-Mail if you need to know exactly how to do it.
Stuart
#4
Thanks,
I just needed to know if it was a weekend, i.e. =1 or =7.
Next thing to do is add a 'button' or similar to a worksheet such that I can fire an event when a user clicks on it.
Any ideas?
Alex
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
bluebullet29
General Technical
9
05 October 2015 02:17 PM