.. My prob is when i insert a date in this format DD/MM/AAAA is a working day
for example i insert in D1(preformatted dd/mm/yyyy) 25/12/2004 is not a workin day make to appeaR a msg box “attention not a work day, repeat!”
my idea is to insert in a column a all workin day and find the relative value in that… or you have another way?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
SURE INSERTING A WORKING DATE (2000 sr 1)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » SURE INSERTING A WORKING DATE (2000 sr 1)
- This topic has 52 replies, 4 voices, and was last updated 21 years ago.
AuthorTopicWSsal21
AskWoody LoungerMay 20, 2004 at 12:11 pm #405187Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody LoungerMay 20, 2004 at 12:52 pm #830040You can use Validation for this, together with the WORKDAY function from the Analysis Toolpak add-in. Unfortunately, I don’t know what this function is called in Italian, and it won’t help if I attach a workbook, for Analysis Toolpak functions are not translated into another language automatically.
Create a table of holidays, for example:
A B 1 Date Holiday 2 01/01/2004 New Year’s Day 3 11/04/2004 Easter Monday 4 01/05/2004 Labour Day 5 20/05/2004 Ascension Day 6 25/12/2004 Christmas Day This table may be in another worksheet. Use Insert | Name | Define to give the first column of this table the name Holidays.
Go back to the worksheet with the date. Say that your date is in D1. In another cell, say in E1, enter this formula, replacing WORKDAY by the Italian version:
=WORKDAY(D1-1,1,Holidays)
Now select D1, and select Data | Validation…
In the dropdown list, select Custom, and in the Formula box, enter=(D1=E1)
In the Error Message tab, enter the appropriate warning.
-
WSTonyE
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 20, 2004 at 1:59 pm #830104Try this: select E1, press F2, then press Enter without changing anything.
If that doesn’t work, try to find out what the exact name of the WORKDAY function in Italian is (GIORNO.LAVORATIVO according to Tony55); perhaps I made a typing error.
As I explained before, the Analysis Toolpak functions are not translated automatically, so I cannot attach the version that works for me. The Dutch version of the WORKDAY function would not work in Italian.
-
WSsal21
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody LoungerMay 21, 2004 at 9:37 am #830504…………….
You can use Validation for this, together with the WORKDAY function from the Analysis Toolpak add-in. Unfortunately, I don’t know what this function is called in Italian, and it won’t help if I attach a workbook, for Analysis Toolpak functions are not translated into another language automatically.
Create a table of holidays, for example:
A B
1 Date Holiday
2 01/01/2004 New Year’s Day
3 11/04/2004 Easter Monday
4 01/05/2004 Labour Day
5 20/05/2004 Ascension Day
6 25/12/2004 Christmas DayThis table may be in another worksheet. Use Insert | Name | Define to give the first column of this table the name Holidays.
Go back to the worksheet with the date. Say that your date is in D1. In another cell, say in E1, enter this formula, replacing WORKDAY by the Italian version:
=WORKDAY(D1-1,1,Holidays)
Now select D1, and select Data | Validation…
In the dropdown list, select Custom, and in the Formula box, enter=(D1=E1)
In the Error Message tab, enter the appropriate warning.
………
-
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 21, 2004 at 10:21 am #830544The third tab in the Data Validation dialog allows you to specify the icon, the title and the text of the error message, just like you can with a VBA MsgBox.
If you really want to use VBA, you can use the Worksheet_Change event of Foglio1:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range(“D1”)) Is Nothing Then
If Weekday(Range(“D1”)) = vbSaturday Or _
Weekday(Range(“D1”)) = vbSunday Then
MsgBox “You entered a weekend day. Please enter another day.”, vbExclamation, “Attenzione”
ElseIf Not Worksheets(“Foglio2”).Range(“Holidays”).Find(Range(“D1”)) Is Nothing Then
MsgBox “You entered a holiday. Please enter another day.”, vbExclamation, “Attenzione”
End If
End If
End SubSee attached workbook.
-
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 21, 2004 at 1:03 pm #830626I created the workbook in Excel 2002. I don’t think I used anything that is specific to Excel 2002, but I don’t have Excel 2000 to test. Perhaps a Lounger using Excel 2000 would be so kind to test the workbook on his/her system.
By the way, I recommend setting macro security to Medium (Media in Italian). The macro warnings may seem a nuisance, but better be safe than sorry.
-
WSsal21
AskWoody Lounger -
WSsal21
AskWoody Lounger -
H. Legare Coleman
AskWoody PlusMay 21, 2004 at 2:18 pm #830670Your code does not seem to work on XL2K. The modification below works on my system:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("D1")) Is Nothing Then If Weekday(Range("D1")) = vbSaturday Or _ Weekday(Range("D1")) = vbSunday Then MsgBox "You entered a weekend day. Please enter another day.", vbExclamation, "Attenzione" ElseIf Not Worksheets("Foglio2").Range("Holidays").Find(Worksheets("Foglio1").Range("D1").Value) Is Nothing Then MsgBox "You entered a holiday. Please enter another day.", vbExclamation, "Attenzione" End If End If End Sub
-
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
H. Legare Coleman
AskWoody PlusMay 21, 2004 at 2:18 pm #830671Your code does not seem to work on XL2K. The modification below works on my system:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("D1")) Is Nothing Then If Weekday(Range("D1")) = vbSaturday Or _ Weekday(Range("D1")) = vbSunday Then MsgBox "You entered a weekend day. Please enter another day.", vbExclamation, "Attenzione" ElseIf Not Worksheets("Foglio2").Range("Holidays").Find(Worksheets("Foglio1").Range("D1").Value) Is Nothing Then MsgBox "You entered a holiday. Please enter another day.", vbExclamation, "Attenzione" End If End If End Sub
-
WSHansV
AskWoody LoungerMay 21, 2004 at 1:03 pm #830627I created the workbook in Excel 2002. I don’t think I used anything that is specific to Excel 2002, but I don’t have Excel 2000 to test. Perhaps a Lounger using Excel 2000 would be so kind to test the workbook on his/her system.
By the way, I recommend setting macro security to Medium (Media in Italian). The macro warnings may seem a nuisance, but better be safe than sorry.
-
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 21, 2004 at 10:21 am #830545The third tab in the Data Validation dialog allows you to specify the icon, the title and the text of the error message, just like you can with a VBA MsgBox.
If you really want to use VBA, you can use the Worksheet_Change event of Foglio1:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range(“D1”)) Is Nothing Then
If Weekday(Range(“D1”)) = vbSaturday Or _
Weekday(Range(“D1”)) = vbSunday Then
MsgBox “You entered a weekend day. Please enter another day.”, vbExclamation, “Attenzione”
ElseIf Not Worksheets(“Foglio2”).Range(“Holidays”).Find(Range(“D1”)) Is Nothing Then
MsgBox “You entered a holiday. Please enter another day.”, vbExclamation, “Attenzione”
End If
End If
End SubSee attached workbook.
-
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSsal21
AskWoody LoungerMay 21, 2004 at 9:37 am #830505…………….
You can use Validation for this, together with the WORKDAY function from the Analysis Toolpak add-in. Unfortunately, I don’t know what this function is called in Italian, and it won’t help if I attach a workbook, for Analysis Toolpak functions are not translated into another language automatically.
Create a table of holidays, for example:
A B
1 Date Holiday
2 01/01/2004 New Year’s Day
3 11/04/2004 Easter Monday
4 01/05/2004 Labour Day
5 20/05/2004 Ascension Day
6 25/12/2004 Christmas DayThis table may be in another worksheet. Use Insert | Name | Define to give the first column of this table the name Holidays.
Go back to the worksheet with the date. Say that your date is in D1. In another cell, say in E1, enter this formula, replacing WORKDAY by the Italian version:
=WORKDAY(D1-1,1,Holidays)
Now select D1, and select Data | Validation…
In the dropdown list, select Custom, and in the Formula box, enter=(D1=E1)
In the Error Message tab, enter the appropriate warning.
………
-
WSHansV
AskWoody Lounger -
WSsal21
AskWoody Lounger -
WSHansV
AskWoody LoungerMay 20, 2004 at 1:59 pm #830105Try this: select E1, press F2, then press Enter without changing anything.
If that doesn’t work, try to find out what the exact name of the WORKDAY function in Italian is (GIORNO.LAVORATIVO according to Tony55); perhaps I made a typing error.
As I explained before, the Analysis Toolpak functions are not translated automatically, so I cannot attach the version that works for me. The Dutch version of the WORKDAY function would not work in Italian.
-
WSsal21
AskWoody Lounger -
WSHansV
AskWoody Lounger
-
-
WSsal21
AskWoody Lounger
-
-
WSHansV
AskWoody Lounger
-
-
WSTonyE
AskWoody Lounger
-
-
WSHansV
AskWoody LoungerMay 20, 2004 at 12:52 pm #830041You can use Validation for this, together with the WORKDAY function from the Analysis Toolpak add-in. Unfortunately, I don’t know what this function is called in Italian, and it won’t help if I attach a workbook, for Analysis Toolpak functions are not translated into another language automatically.
Create a table of holidays, for example:
A B 1 Date Holiday 2 01/01/2004 New Year’s Day 3 11/04/2004 Easter Monday 4 01/05/2004 Labour Day 5 20/05/2004 Ascension Day 6 25/12/2004 Christmas Day This table may be in another worksheet. Use Insert | Name | Define to give the first column of this table the name Holidays.
Go back to the worksheet with the date. Say that your date is in D1. In another cell, say in E1, enter this formula, replacing WORKDAY by the Italian version:
=WORKDAY(D1-1,1,Holidays)
Now select D1, and select Data | Validation…
In the dropdown list, select Custom, and in the Formula box, enter=(D1=E1)
In the Error Message tab, enter the appropriate warning.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
55 minutes ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
6 hours, 11 minutes ago -
Stop the OneDrive defaults
by
CWBillow
1 hour, 43 minutes ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
11 hours, 39 minutes ago -
X Suspends Encrypted DMs
by
Alex5723
13 hours, 51 minutes ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
14 hours, 9 minutes ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
14 hours, 46 minutes ago -
OpenAI model sabotages shutdown code
by
Cybertooth
15 hours, 23 minutes ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
3 hours, 33 minutes ago -
Enabling Secureboot
by
ITguy
10 hours, 33 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
23 hours, 17 minutes ago -
No more rounded corners??
by
CWBillow
19 hours, 6 minutes ago -
Android 15 and IPV6
by
Win7and10
8 hours, 51 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
1 day, 11 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
1 day, 14 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
1 day, 8 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day, 21 hours ago -
May preview updates
by
Susan Bradley
1 day, 9 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
1 day ago -
Just got this pop-up page while browsing
by
Alex5723
1 day, 13 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
1 day, 10 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
13 hours, 6 minutes ago -
At last – installation of 24H2
by
Botswana12
2 days, 13 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
9 hours, 53 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
3 days, 1 hour ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
23 hours, 49 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
3 days, 14 hours ago -
Another test post
by
gtd12345
3 days, 15 hours ago -
Connect to someone else computer
by
wadeer
3 days, 9 hours ago -
Limit on User names?
by
CWBillow
3 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.