.. 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
-
LibreOffice 25.8. No Windows 7, 8/8.1, x86
by
Alex5723
2 hours, 52 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
18 hours, 48 minutes ago -
June KB5060842 update broke DHCP server service
by
Alex5723
17 hours, 20 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
21 hours, 22 minutes ago -
Excessive security alerts
by
WSSebastian42
17 hours, 3 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 6 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
9 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
17 hours, 59 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
33 minutes ago -
OS news from WWDC 2025
by
Will Fastie
4 hours, 7 minutes ago -
Need help with graphics…
by
WSBatBytes
2 hours, 9 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
1 day, 22 hours ago -
Totally remove or disable BitLocker
by
CWBillow
21 hours, 26 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
1 day ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
2 days, 9 hours ago -
Search Forums only bring up my posts?
by
Deo
3 hours, 31 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
2 days, 20 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
2 days, 13 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
2 days, 21 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 7 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 8 hours ago -
Disengage Bitlocker
by
CWBillow
2 days, 22 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 days, 10 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
3 hours, 35 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
3 days, 17 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
3 days, 17 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
3 days, 21 hours ago -
New PC transfer program recommendations?
by
DaveBoston
2 days, 2 hours ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
4 days, 1 hour ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
4 days, 1 hour ago
Recent blog posts
- Ben’s excellent adventure with Linux
- Seconds are back in Windows 10!
- WebBrowserPassView — Take inventory of your stored passwords
- OS news from WWDC 2025
- Best tools for upgrading a Windows 10 to an 11
- Master patch listing for June 10, 2025
- 24H2 may not be offered June updates
- June 2025 updates are out
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.