.. 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?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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 LoungerWSHansV
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
-
Windows 10 22H2 Update today (5 June) says up-to-date but last was 2025-04
by
Alan_uk
52 minutes ago -
Thoughts on Malwarebytes Scam Guard for Mobile?
by
opti1
4 hours, 1 minute ago -
Mystical Desktop
by
CWBillow
4 hours, 14 minutes ago -
Meta and Yandex secretly tracked billions of Android users
by
Alex5723
6 hours, 57 minutes ago -
MS-DEFCON 2: Do you need that update?
by
Susan Bradley
1 hour, 23 minutes ago -
CD/DVD drive is no longer recognized
by
WSCape Sand
19 hours, 27 minutes ago -
Windows 11 24H2 Default Apps stuck on Edge and Adobe Photoshop
by
MikeBravo
22 hours, 16 minutes ago -
North Face and Cartier customer data stolen in cyber attacks
by
Alex5723
20 hours, 22 minutes ago -
What is wrong with simple approach?
by
WSSpoke36
12 hours, 54 minutes ago -
Microsoft-Backed Builder.ai Set for Bankruptcy After Cash Seized
by
Alex5723
1 day, 7 hours ago -
Location, location, location
by
Susan Bradley
1 hour, 35 minutes ago -
Cannot get a task to run a restore point
by
CWBillow
1 day, 9 hours ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
23 hours, 56 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
1 day, 19 hours ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
16 hours, 22 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
1 day, 19 hours ago -
How start headers and page numbers on page 3?
by
Davidhs
2 days, 6 hours ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
1 day, 9 hours ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
2 days, 14 hours ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
2 days, 15 hours ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
2 days, 4 hours ago -
Firefox 139
by
Charlie
1 day, 21 hours ago -
Who knows what?
by
Will Fastie
23 hours, 40 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
2 days, 15 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
9 hours, 19 minutes ago -
Misbehaving devices
by
Susan Bradley
1 day, 11 hours ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
3 days, 21 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
20 hours, 32 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
3 days, 20 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
2 days, 19 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.