+ Reply to Thread
Results 1 to 13 of 13

Detect if there is a public holiday an closes collectively holiday in row

  1. #1
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Detect if there is a public holiday an closes collectively holiday in row

    Hi

    The example is a calendar. In j5 i want to make the some of the public holiday + collectively holliday. So there is no collectively holdiay only a public holiday so in j5 =1

    The collerd cells are the public holiday and collectively holliday made by conditional formating.

    How can i do that.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Detect if there is a public holiday an closes collectively holiday in row

    I think that you're going to struggle for a good answer without translating the contents of your sample file.

    This looks right, but I don't know the function translations.

    =SUMPRODUCT(COUNTIFS(Feestdagen,B5:H5,Feestdagen,">0")+COUNTIFS('Feestdagen Verlofcodes'!$D$4:$D$16,B5:H5,'Feestdagen Verlofcodes'!$D$4:$D$16,">0"))

  3. #3
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    Thnx but ons tuin u in de formula i dont understand !
    What range is declared to feestdagen
    I cant remember that I make a name feestdagen
    I now how to translate the formula
    Look tomorrow of later on.
    I let you now it works

  4. #4
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    @jason.b75
    Did you test the formula it's not working

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Detect if there is a public holiday an closes collectively holiday in row

    Define 'not working'

    It gave me results, whether or not those results match what you expect is another matter. As I don't understand the Belgian language, there was guesswork involved.

  6. #6
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    test it in de example

  7. #7
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    What i want is that there where x is count how many public hoilidays there are in te week

  8. #8
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    i test it with aantallen.als = countifs
    countif(feestdagen;b5:h5;feestdagen;">0") give nothing

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Detect if there is a public holiday an closes collectively holiday in row

    That is because the rest of the formula is missing.

    countif(feestdagen;b5:h5;feestdagen;">0")

    When a criteria refers to more than 1 cell or value, as highlighted above, then an array function is needed to complete the calculation.

    Try =SUMPRODUCT(COUNTIFS(feestdagen;b5:h5;feestdagen;">0")) and you should get a result.
    Attached Files Attached Files
    Last edited by jason.b75; 07-23-2018 at 12:01 PM.

  10. #10
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    now its working !

    But why must there sumproduct in the formula ?
    I look at this to understand countifs or aantallen.als
    https://support.office.com/en-us/art...c-aa8c2a866842
    Why they dont need sumproduct

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Detect if there is a public holiday an closes collectively holiday in row

    The examples that you looked at on the support page are basic, the method used here is slighly advanced.

    As I said in my previous post, when a criteria refers to more than 1 value or cell, an array function is needed to complete the calculation.

    B5:H5 is a range of 7 cells, which is more than 1, so needs sumproduct to complete the calculation.

    The array can be completed with other functions as well, but for what you need sumproduct is the correct one to use.

  12. #12
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Detect if there is a public holiday an closes collectively holiday in row

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.

    No further help to be offered, please, until the OP has complied with this request.

  13. #13
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: Detect if there is a public holiday an closes collectively holiday in row

    it must be closed

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 02-14-2017, 04:27 PM
  2. working on a holiday planner based on various holiday anniversary dates
    By marktc19 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2017, 09:26 AM
  3. Networkdays with holiday - start date falls on a holiday
    By skexcelforum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2014, 01:47 AM
  4. fixed holiday, floating holiday and night differential hours
    By gerard_gonzales33 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-05-2014, 02:33 AM
  5. [SOLVED] IF function using WORKDAYS and a Bank Holiday list - trying to add new holiday dates
    By jowarks in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-05-2013, 05:42 AM
  6. Weekday Function and getting public holiday date
    By JuzMe in forum Excel General
    Replies: 3
    Last Post: 06-12-2008, 06:03 AM
  7. Weekday, Public Holiday function
    By bnwash in forum Excel General
    Replies: 1
    Last Post: 05-19-2008, 03:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1