Avatar of trowa
trowa

asked on 

Autopopulate a calendar? Fix the duplicate issue

I'm trying to enhance a calendar developed by some experts.

This is what I have so far. The Excel generates calendars based on value selected in A1.

User generated image
But I got one issue, pls check formula of J18, the formula returns 3 for total working days, which exclude the Public Holidays and Off Days.

My problem comes in if I accidentally entered 25 Dec 17 into the worksheet: Off Days. Then the formula in J18 returns as 2, which is incorrect (because 25 Dec 17 was double-counted).

Can anyone advise what need to adjust?

Thank you.
Costs.xlsx
Microsoft OfficeMicrosoft ExcelSpreadsheets

Avatar of undefined
Last Comment
trowa
SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of trowa
trowa

ASKER

Hi Rob,

I would suggest you put data validation in place on the list of Off Days so that dates cannot be duplicated.
That's a good idea!

I see you're not using the formula I provided for the count of working days, although you accepted my solution and actually said you did not understand the SUMPRODUCT formula provided by another EE member
It's because I thought NETWORKDAYS can only refer to one list (either Public Holidays or Off Days, but not both)?

It is possible to include two lists of dates with NETWORKDAYS function but they have to be next to each other so that the Holidays range in the calculation can include them all in one range

Is that mean the Public Holidays and Off Days need to be converted into one table? If yes, how will it looks like?

Thank you.
Avatar of trowa
trowa

ASKER

Hi Rob,

Wondering what do you mean by below before closing this question

It is possible to include two lists of dates with NETWORKDAYS function but they have to be next to each other so that the Holidays range in the calculation can include them all in one range

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of trowa
trowa

ASKER

I kinda get what you mean now.

The trick is on Holidays[[Dates]:[Off Days] which refers to 2 columns in Holidays range?
SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of trowa
trowa

ASKER

Thank you for clearing my doubts!
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo