+ Reply to Thread
Results 1 to 42 of 42

Help Requested in the Creation of a Company Calendar

  1. #1
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Help Requested in the Creation of a Company Calendar

    Hi everybody,

    With reference to the attached, I am creating a company calendar so as to keep track of pertinent dates. My country of operation is extremely bureaucratic and the government bodies extremely aggressive; a single non-compliance [even an unintentional one] usually results in punitive fines and penalties being levied. It's my opinion that the level of bureaucracy is intentional, to benefit the revenue of the government bodies, but I digress...

    To remain compliant and reduce the risk of being fined, it is essential that I have a calendar showing all important dates, which I can add to as and when, but which can update itself year on year. Attached is such a document, or an attempt at one at least.

    The 'Master' tab is where the data is input. I input the deliverable in column B, and frequency of the deliverable in column C. Depending on the frequency chosen, depends on which data validation lists in columns D - U become available. Regardless of columns make themselves available, each of the choices in columns D - U allow for the user to create a date using data fro the drop down lists. Once data has been selected from these lists, a date will appear in column W representing the first date in the year that this deliverable is due on (it defaults to the earliest possible date in the year).

    The intention is for this information to self-populate into the 'Calendar' tab, based on the date in column W and the frequency selected. For example, row 5 on the 'Master' tab shows management accounts are deliverable monthly, on the 15th of each month. The first date that they are due in the year is the 15 January 2017 (see column W) therefore in my 'Calendar' tab, I want the cell D21 (the narrative box for the day of 15 January 2017) to display the text 'Management Accounts'. The calendar should also detect that management accounts are due monthly therefore the calendar should populate all dates beginning with '15' e.g. 15 Feb, 15 Mar, 15 Apr and so on.

    However, reverting back to the 'Master' tab, there exists a second option in column V, which can override the default date in column W. Take row 8 for example - the deliverable is a theoretical new government requirement levied on all companies, which requires all companies to submit a declaration form on Thursday of each week. The frequency selected is therefore 'weekly' and the day of submission is selected as 'Thursday'. The date is column W by default selects the first Thursday of the year, but let's say that this new requirement was only introduced on Thursday 15 June 2017 - I don't want my 'Calendar' tab to show this requirement on every Thursday beginning 05 January 2017, I only want it to show from Thursday 15 June 2017 as it was only a requirement from this date. Hence, I override the date in column W with the relevant date (15/06/2017). The calendar should therefore be based on the 'Final Date' in column Y.

    Also, and probably the trickiest part, is that if two or more deliverables are due on the same date, the calendar would need to display all of those deliverables in the same cell in column 'D'. I imagine this will either be nigh on impossible, or easily achieved using a concatenate formula or something similar.

    All help and advice welcome. Thanks in advance.

    PS there is a function to update the calendar for new years - simply select your chosen year from the drop down list in cell C3 on the 'Calendar' tab.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    I have not tried to digest your thread but first impressions is that the attached would provide a simpler approach (courtesy of Pete_UK!)

    The number of entries per day can be adjusted with a little "tweaking"
    Attached Files Attached Files

  3. #3
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Thanks John. I didn't think to convert the date into numerics and use a concatenate countif function to populate the calendar. Strange, because I use concatente & countif to replicate data elsewhere, quite often. I'll have a go with this on my own spreadsheet as it doesn't look like Pete_UK's sheet has a function for automatically replicating tasks on future dates according to a specified frequency. I'll upload a copy of my calendar for anyones/everyones benefit, if I'm successful in my endeavour.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Just a general observation about the "Base_Data" sheet: there is a lot of (unnecessary in my view) data replication.

    Even if Pete's calendar is not suitable, I think you are making something relatively simple into something overly complex!

  5. #5
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi All,

    Further to the above, I've developed the spreadsheet somewhat. I need assistance with the population of the calendar tab. With reference to the attached:

    - Navigate to the 'Calendar' tab.
    - Taking row 8 as an example, I want cell I8 to populate itself with particular text (the 'Deliverable' which can be found in column B of the 'Master' tab)
    - In order to populate itself with the correct deliverable, cell I8 should contain a formula which uses the data in cell G8 of the 'Calendar' tab as the lookup criteria
    - This lookup criteria should then be used to find the same point of reference in the array AA11 : OB37 (in this case the lookup criteria in cell G8 of the 'Calendar' tab [47236_0] can be found in cell AA13 in the array on the 'Master' tab.
    - The 'deliverable' for this reference (shown in cell B of the same row) is 'Payment of Salaries' therefore the text 'Payment of Salaries' should show in cell I8 of the 'Calendar' tab

    Basically then, I need a formula capable of locating a particular reference within a given range, which when found, replicates text from a certain column on the same row. I imagine some sort of Index Match, sumproduct or combination of the two could be used, but as you can see I'm having trouble avoiding formula errors!
    Attached Files Attached Files
    Last edited by STUARTXL; 03-08-2017 at 07:16 AM.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    I'm just about to go out, but I'll take a look at this later on.

    Pete

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Try

    in I8

    =IFERROR(INDEX(MASTER!$B$1:$B$37,SUMPRODUCT((MASTER!$AA$1:$OB$37=Calendar!$G8)*ROW(MASTER!$AA$1:$OB$37))),"")
    Attached Files Attached Files

  8. #8
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi John,

    This works almost perfectly, bar one small glitch. In cells I11 and I12 of the 'Calendar' tab, which shouldn't generate any results as there is no corresponding match in the range, we are being given the text 'Deliverable' and 'Management Accounts' respectively.

    This error does not repeat anywhere else as far as I can see, it only occurs in the first day of the calendar. I've had a look but I'm totally clueless as to why this is happening. Is there a fix for this?

    Thanks for taking the time to provide a solution and FYI I agree there is too much data on the 'Master' tab, but the luxury of taking the time to make my documents as efficient as possible is something I don't have at present, so as long as it works, I'm happy.

  9. #9
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Scratch that. I found another problem. Allow me to upload my amended document in a minute.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Try

    =IF(SUMPRODUCT((MASTER!$AA$1:$OB$37=Calendar!$G8)*ROW(MASTER!$AA$1:$OB$37))=0,"",INDEX(MASTER!$B$1:$B$37,SUMPRODUCT((MASTER!$AA$1:$OB$37=Calendar!$G8)*ROW(MASTER!$AA$1:$OB$37))))

  11. #11
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    It seems (using your first formula) there was another error arising on the second day of the month too if you were to increase the number of entries you wanted a day however, your new formula overcomes both these errors and seems to be working perfectly. Thank you.

    Now, onto the task of populating the range on the 'Master' tab so that concatenate results appear in the relevant dates, using the final date as a base and the frequency as the interger (right term?). Glenn had assisted me in something similar not too long ago, but I have added a few more frequency values since then. I'm going to have a crack at it myself but no doubt I'll be back on here real soon asking for assistance!

  12. #12
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    OK so as predicted, I don't possess the skill set to populate the range in the fashion described. Can anyone help?

    With reference to the attached, the spreadsheet is all but finished. I have a summary which the user can arrange by urgency of task (critical, high, medium, low), or by the number of days remaining until the submission date of each task (from least number of days remaining to the most). The calendar is also self-populating thanks to John's formula. The only missing piece that will complete this document is the population of the cells in the range AC21 : OD46 on the 'Master' tab.

    All of the cells in this range need to generate the concatenate formula you see in the top 6 rows, should that 'deliverable' (column B) fall due on the respective date (respective date shown on row 20 of the columns AC - OD). Whether the deliverable falls due on the date depends on the frequency chosen for the deliverable (column C) and the start date for that deliverable (column AA - note that column AA takes the default date from column Y, unless the user selects a later date in column Z, in which case column AA takes the date in column Z).

    Each frequency option has a definition expressed in terms of intergers (see cells B3 : C12) e.g. any daily frequency should generate a result every single day after the date in column AA, any weekly frequency should deliver a result every seven days after that date in column AA, any fortnightly frequency should deliver a result every fourteen days after the date in column AA and so on.

    Can anyone help? This task was a lot more complicated than I thought when I first set out constructing this document, and a lot of work and development has gone into this document in order to make it as fluid, automated and user friendly as possible. It would be a shame if I fell at this last hurdle. Thanking everyone in advance for their help.

    EDIT: One final thing, the array must also be capable of generating correct results using the base date column AA, even if the date in column AA is in a different year to the dates in row 20 of the range. For example, the base date (column AA) is always static as there can only ever be one start date for the deliverable. Lets say the user inputs a start date for a deliverable as 01 Jan 2017, and also selects the frequency as weekly. A result should be generated every seven days in the range. But, come 2018, the user will need to update the year (see cell F3 of the 'Calendar' tab) and upon doing so, the dates in row 20 of the range AC21: OD46 will change to 2018. The cells in this range need to continue generating results every seven days from the base date e.g. the start date (column AA) will remain as 01 Jan 2017 (a Sunday), so therefore the first Sunday of 2018 (07 January 2018) must also generate a result.
    Attached Files Attached Files
    Last edited by STUARTXL; 03-08-2017 at 02:45 PM.

  13. #13
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    You already have a formula in the cells AC21:OD46, although this is only really taking account of a frequency of "Daily". Are you saying, then, that if C21:C46 contains other frequencies like Weekly, Monthly etc. this formula won't cope, so that's why you want it amended?

    It strikes me that if that is the case then it will be quite a long formula, with an IF for each of the 10 frequency types that you have defined in B3:B12, and you will want to copy this to 365 columns over 25 rows, so your file will be very large (it's already 1.5 mB). As John said earlier, this has developed into "something overly complex", though I appreciate the amount of work that you have put in to develop it so far.

    I'll have a think of ways to simplify what could be a monster formula.

    Hope this helps.

    Pete

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Questions: Do (we!) only consider workdays?

    When you say same date every 2/6/12/24 months/ what happens if the date is a non-workday?

  15. #15
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi Pete, John,

    In response to your question Pete, yes I am looking for a formula that takes account of all frequency options. As you have correctly pointed out, at present, it only accounts for the 'daily' option and therefore needs to be amended (presumably with multiple, nested if formulas) to account for all other frequency types. I don't have a problem with the nested if formula, but I am struggling to express the intervals/frequencies in the formula for each frequency type, such that it works as per the definitions of the frequencies.

    I appreciate the file size is quite large, but I am also building this spreadsheet with succession planning in mind. I volunteered to work in a remote part of Africa where the typical stint of an expatriate is 2 - 3 years and I want to avoid leaving the department in such a state whereby everything resets to zero when a changeover in management occurs (as I'm led to believe is usually the case for small companies with little in the way of automated processes and controls). Hence, I am trying to build the spreadsheet where minimal data entry is required by the user and at the turn of a year, all the user has to do is change the year of the calendar and all the existing data carries through correctly. So, rather than any incoming manager have to create their own way of managing pertinent deadlines, there will already be a source of data which is easy to maintain. This is a sentiment I carry through to most of my spreadsheets, purely for this reason.

    In response to your post John, this isn't something I'd yet considered. I think it is easier that we assume all days (including weekends) are workdays. Not least because it would depend on the nature of the deliverable in question as to whether the deadline would be allowed to fall on a weekend, but also for the sake of simplicity I think it's best if we avoid creating more 'if' scenarios. The spreadsheet is already being designed with ergonomics as a priority, but a line needs to be drawn somewhere and I think, reasonably so, we should assume the user/manager using the spreadsheet is capable of determining whether the deadline falls on a weekend and whether they need to submit before or after a weekend should it do so.
    Last edited by STUARTXL; 03-08-2017 at 03:41 PM.

  16. #16
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Okay, put these numbers in cells D3:D12:

    1
    7
    14
    30
    14
    91
    61
    182
    365
    730

    (They are approximations, but let's go with these for the moment to see how it works out).

    Then you can put this formula in AC21:

    =IF($AA21>AC$20,"",IF($AA21=AC$20,AC$20&"_"&(COUNTA(AC$19:AC20)-COUNTIF(AC$19:AC20,"")),IF(MOD(AC$20-$AA21,VLOOKUP($C21,$B$3:$D$12,3,0))=0,AC$20&"_"&(COUNTA(AC$19:AC20)-COUNTIF(AC$19:AC20,"")),"")))

    and copy across and down as required.

    I've not had chance to read the later posts while I've been working on this, and I'm going out now (again !!), but I'll pick up on any comments when I get back.

    Hope this helps.

    Pete

  17. #17
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi Pete,

    This works surprisingly well. I thought the formula would have been much longer. I'm very impressed given that you haven't had much time to spend on it. Thank you. So far I can only find the following problems:

    - Whichever part of your formula generates the result for the 'One-off' frequency, is correctly generating the result in the appropriate date, but all dates thereafter are generating a #N/A error (see attached doc).

    - Secondly, and as you validated in your post, you've just had a cursory glance/attempt at this before heading out again (there are some decent pubs in Warrington, I don't blame you) and therefore have only used approximations for some of the frequency parameters, I suspect you're already aware of the following. But the bi-monthly (twice a month) frequency generates results every 14 days (same as fortnightly). The reason for adding in a bi-monthly option (as distinguished from fortnightly) was that the first deadline in the month would be the same day every month and the second deadline would be 14 days fro the first date. For example, the first deadline day could be the 01 January and the second deadline day would therefore be the 15 January. The next deadline after 15 January would therefore be 01 February (same date of the month) which is 17 days after the 15 January, not 14 days later as currently is the case.

    Thanks again for your help.
    Attached Files Attached Files
    Last edited by STUARTXL; 03-08-2017 at 04:41 PM.

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    For my intellectual "curiosity" I produced the following set of formulae:

    The first 3 use Pete's MOD function but the others (hopefully) meet the more exacting requirements of start dates.

    I am sure there are "shorter" versions ....
    Attached Files Attached Files

  19. #19
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Hi Stuart,

    Sadly, it wasn't a pub I was visiting tonight - just family.

    A few general points about this project:

    I found it very irritating that it took several seconds to recalculate everything when I was working on the file earlier, and not all the formulae are in place yet - I'm sure the users of the file will also object to its sluggishness, so you need to consider ways that you might improve on this.

    Given that the file is still in development mode, it is pointless to extend the formulae in the Calendar sheet, for example, down to row 11000, or to have a full year's worth of formulae in the Master sheet, so if you just had a capability to display, say, two months of data, then you can delete all those extra rows and columns and the file will be much smaller (easier to post here), as well as being quicker. You can always copy formulae down or across when you are ready to compile the release version.

    It is also unnecessary during testing to hide sheets - I had to unhide the Base_Data sheet in order to fully understand how the date in column Y of the Master sheet was derived.

    You mentioned that it will be easy enough for a user to change the year (it would be easier still for them if it were a drop-down), but you could also introduce a drop-down to select a particular month, and in that case you wouldn't need so many rows in the Calendar sheet or columns in the Master sheet, thus making the file smaller still and quicker to recalculate. On one of my Calendar files the OP needed to be able to display up to 100 items per day, so I set up the capability to display 10 events per day and provided another drop-down to enable a choice of ranges 1-10, 11-20, 21-30 etc. - you might want to think about this approach as another way to make the file smaller.

    Hope you find these comments useful.

    Pete

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    @Pete,

    I "offered" Stuart one of your calendar workbooks early in the thread but he felt he had put much effort into his version so was reluctant (understandably) to change course.

    It might still turn out to (have been) the better option.

  21. #21
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi Pete, John,

    In response to John's post first, the formula work exactly how I want them. Each frequency has it's own separate formula on each row, each of which works perfectly in it's own right. However, when I try to nest them all together in one cell (this is what I will need to do eventually, so I was first trying to nest them on the sheet attached and make sure the nesting works, at which point I would then carry over to my sheet and make the necessary adjustments again), I get 'FALSE' results at the point of incorporating the fortnightly formula i.e. I nested the weekly into the daily to create a daily/weekly formula and it worked fine. When I nest the fortnightly into the daily/weekly I get a FALSE value on the 'fortnightly' row. I removed all '$' in cell references where necessary to allow drag down/across but still the FALSE value remained. I then attempted to nest monthly into the daily/weekly in the hope that it was just the fortnightly formula in isolation that was creating the problem, but the same FALSE value appears. I have been through the formula meticulously and can't find anything obviously wrong, so I'm assuming that there must be some function of the MOD formula that is incompatible with what I'm trying to do (I've never used MOD before so this is purely a guess).

    Thanks for your comments Pete. The slow speed of the file is indeed an irritation, but I think once all formula are in place then it will be a case of the user inputting very small amounts of data at a time and it updating [relatively] quickly. You are correct, the speed is something that needs to be improved upon, but the main purpose of creating this file is to create reminders for important deadlines in order to avoid punitive non-compliance fines from aggressive government bodies. The scale of aggressiveness shown by government inspectors in the country I currently work in is astounding and even the smallest non-compliance can result in a hefty fine. For example, when a new employee is recruited, a copy of their signed contract must be stamped in a particular order by five different authorities, with each stamp being affixed within a certain time frame (it doesn't help that the time frames vary with each body). During a compliance audit last year, it was found that we had one single stamp missing from only one employee contract, and consequently we were given a fine running into the tens of thousands of dollars (we managed to successfully refute but regardless, this serves as an example of the business environment I'm operating in). Hence, the sluggishness I doubt will be a major concern of the other management. If the sheet can assist them with deadlines reminders and thus avoid these types of problems, I think the speed [or lack of] can be tolerated until such a time as I can create a more efficient spreadsheet.

    Noted your comments on extending the rows unnecessarily and hiding sheets. The rows had been set to 11,000 accommodate an increase in daily activities. Essentially, row 47 on the 'Master' tab counts the number of deliverables per day. Cell AB47 finds the MAX of these. The value in cell AB47 then feeds through to cell F5 on the 'Calendar' tab and the calendar will then allow for this number of entries per day. I assumed a maximum of 30 deliverables on any one day hence 11,000 rows were needed (30 x 365 days).

    As for the user being able to change the year from a drop down list, this is already the case (see F3 on the 'Calendar' tab). I will look at introducing a drop down for a particular month to reduce file size.

    All comments are helpful, it's always great to receive advice from experts such as yourself and John.

  22. #22
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Stuart,
    Did you get a chance to look at the "prototype" frequency calculator? If so, does the logic meet you requirement (as all conditions cannot unfortunately be met with simple MOD formulae) ?

    The COUNTIFs can be replaced by COUNTA as the tests needs to "non-specific" in that the entries in your table are all different.

    John

  23. #23
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi John,

    Sorry, I'm a little confused. By 'prototype frequency calculator' are you referring to the last spreadsheet you uploaded? If so, yes, the logic meets my exact requirements and I have not found any issues during beta testing.

  24. #24
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Yes ... that's what I meant. Having looked again at the logic, it does meet the the Quarterly requirement of "Month End" dates AND COUNTA won't work either so it is back to the drawing board for me!

  25. #25
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi John,

    I don't know if the attached is of any benefit to you. This part of a cash flow spreadsheet I use for company. Glenn (a user on this forum) helped construct the formula which performs a similar function, albeit with less frequency types. I don't know if there is anything of any use in here for you.

    Please only look at the formula in R12:X13. All cells thereafter may contain some variations (especially the first days of each week post week 1). This may be utterly useless, but on the off chance that it contains anything useful, I thought it best to upload.
    Attached Files Attached Files

  26. #26
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Quote Originally Posted by STUARTXL View Post
    ... Whichever part of your formula generates the result for the 'One-off' frequency, is correctly generating the result in the appropriate date, but all dates thereafter are generating a #N/A error (see attached doc) ...
    This is because One-off was not included in the lookup table. Insert a new row 12 on the Master sheet, so the formulae will automatically adjust, copy B13:D13 into B12:D12, then put "One_Off" in B13, "Single entry" in C13, and a large number in D13 (e.g. 10,000). Then the #N/A errors will disappear from cell HQ31 onwards.

    Hope this helps.

    Pete

  27. #27
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Hi Stuart,

    I've just noticed that you have a complex formula to generate the dates across the Master sheet - all you need is this in AD21 (might be AD20 for you if you have not added One_Off to the above table):

    =AC21+1

    then copy across.

    Hope this helps.

    Pete

  28. #28
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Stuart,
    Updated my "frequency" file. I have not attempted to merge into a single IF ( word blind !). The Text ("Daily","Weekly" could be replaced by numbers by adding a column to the lookup table.

    I replaced the "Y" with the date (knowing it needs to add the COUNTIF concatenation in your real file.

    And yes, the file from Glenn helped to clear the fog!
    Attached Files Attached Files

  29. #29
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Hi John & Stuart,

    The file in Post #28 is great. I've been working on it further, looking at ways of reducing the number of different types of calculation. To me, the Daily, Weekly, Fortnightly and One_Off are all variations of the same thing, with a different increment of days, so they can all be done with one formula.

    Similarly, Monthly and Quarterly can use one formula, with a different increment of months.

    Bimonthly_two and Biannual_two are again just slightly different versions of the same formula, i.e. Month +2 and Month +6, so they can share the same formula.

    The same applies to Annually and Biannual_Two, where the formula is based on Year +1 and Year +2.

    Bimonthly_twice needs its own formula.

    So this means that there only needs to be 5 different IFs in the composite formula, which will make it a bit easy to compile.

    I'm currently working on setting up those five different formulae and applying them to the range of frequencies in each type, so I'll post that when I get through it.

    Pete

  30. #30
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    Pete,
    Thanks for looking at this.

    I realised that the several of the formula could use the same base e.g MOD for "Daily","Weekly","Fortnightly" etc.

    I was "experimenting", particular with those requiring the "Month-End" condition and the same start for the "Bi-monthly".

    I had reached a point where I needed to leave it for a while ( I was "IF"ed out!).... but now I know it is in safe hands!!

    Thanks again

    John

  31. #31
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    I agree, John your post is great work, your formula really stand by the requirements set out i the frequency definitions. And now I have another Excel formula to add to my skill set (MOD) so thanks!

    I'm also currently working on converging the various frequency formula in post 28, into one single formula. This is proving quite the mind musher, there are so many IF statements floating around that it's hard not to get lost. But thanks to you John, the logic now exists, so it's just a case of me finishing the convergence, so I'm not complaining whatsoever. The hard work has been done by you both. Thanks again.

    I did realise where I was going wrong with the generations of the FALSE values though. I'm not used to seeing IF formula being nested in the 'VALUE IF TRUE' section of another IF statement. I usually make use of AND or OR functions and I'm clearly not advanced enough to converge such formula, so I'm in the process of 'dumbing down' each single frequency formula with AND or IF functions before I then converge one at a time. It makes it easier for me.

    Thanks again both of you.

  32. #32
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    This is proving quite the mind musher ......
    ... tell me about it!!!

    You will have seen Pete is also working on combining the formulae so I will leave it to you both to complete the finished article.

    Look forward to seeing the results.

  33. #33
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Hi John,

    Sorry to bother you again. But to aid my convergance, could you explain what this formula is doing:

    EDATE($A$8,COUNTIF($E$8:E8,">" &0)*2)

    Obviously you're attempting to return a date later than the one shown in cell A8, by taking the date in cell A8 and adding on a specified number of months, but I'm not sure what the red highlight part is doing.

  34. #34
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    In the formula that I'm working on I've actually changed that part to:

    EDATE($A22,COUNTIF($F22:F22,"?*")*VLOOKUP($B22,$B$2:$E$12,4,0))

    as I'm currently returning a string instead of the date. Basically, John's formula was counting how many entries there were above zero in the range $E$8:E8, but that range will increase as the formula is copied across so it is counting the number of non-zero (or non-blank) cells up to the current cell on that row. That is then multiplied by 2 (as this is for every 2 months). What I have done is to change that fixed value of 2 to a variable which is obtained from the lookup table (i.e. 2 for every 2 months, 6 for every 6 months, and so on), so that the same formula can be re-used for other frequency types. I'll post where I'm up to soon.

    Pete

  35. #35
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Okay, this is where I'm up to at the moment.

    I've taken John's file and tried to identify generic similarities for the different frequency types. I have this formula in cell F16:

    =IF($A16>F$15,"",IF(COUNTIF($B$2:$B$5,$B16),IF(MOD(F$15-$A16,VLOOKUP($B16,$B$2:$D$12,3,0))=0,"xxx",""),""))

    which can be used for 4 of the types - it has been copied down to F19, then across. This formula is in F22:

    =IF($A22>F$15,"",IF(COUNTIF($B$8:$B$11,$B22),IF(OR(F$15=$A22,F$15=EDATE($A22,COUNTIF($E22:E22,"?*")*VLOOKUP($B22,$B$2:$D$12,3,0))),"zzz",""),""))

    and again this covers 4 other types, so it has been copied down to F25, then across. I've used this one in F26:

    =IF($A26>F$15,"",IF($B26="Bimonthly_Twice",IF(OR(F$15=$A26,DAY(F$15)=DAY($A26),DAY(F$15)=DAY($A26)+14),"aaa","")))

    I'm currently trying to come up with a generic formula which will go in F20 and F21 (the ones in the file are what John produced, modified slightly).

    The formulae all have the basic form:

    =IF(start_date>date_in_row_15,"",frequency_formula)

    and the frequency_formula will have the generic form:

    IF(exists_in_block_n_of_lookup_table,type_n_formula,"")

    except for the Bimonthly_twice formula. In nesting them together, it will be quite straightforward as the "" shown in red will be substituted by the next generic formula, so the overall formula will be along the lines of:

    =IF(start_date>date_in_row_15,"",IF(block1,type1_formula,IF(block2,type2_formula,IF(block3,type3_formula,Bimonthly_twice_formula))))

    I've noticed that the Bimonthly_twice formula has to have a start date on the 14th of the month or earlier - see what happens if you put 15/01/2017 in cell A26. This might not be a big problem, but if the first time you have to produce this is on 21st of a month, then it should really start from there and then the next ones should be on 7th and 21st of the next month.

    Anyway, see what you think of the attached.

    I'm posting this now because I'm off on holiday for a week tomorrow, so I won't be able to work on this after tonight (but I'll carry on for now).

    Hope this helps.

    Pete
    Attached Files Attached Files

  36. #36
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    I thought as much, but I was doubting whether I was right because of the space between the ">" and the '0'. Shouldn't they be together? I didn't know if the space performed an extra function?

    With regards to the formula for the 'Annually' frequency, one of the OR criteria for generating a result is (cell F10):

    EDATE($A$10,12)=F$1)

    Am I right in thinking that this will only work for one year after that start date? It seems to say IF the date in F$1 is equal to the date in $A$10 plus 12 months, then generate a result. This is fine for the year after the date in $A$10 but what if we roll the calendar forward 2, 3 or 4 years from that date? It doesn't seem to generate a result in this scenario. I have tried using a MOD formula to overcome this problem but keep getting greeted with an error. The only other way I can think of resolving this is to extend the formula, like below:

    OR(EDATE($A$10,12)=F$1),EDATE($A$10,24)=F$1),EDATE($A$10,36)=F$1),EDATE($A$10,48)=F$1)

    It isn't insurmountable but the converged formula is already quite large and I was wondering if there was a way to avoid this unnecessary extension.

    Nearly there with the combined formula so hopefully should have a final product to upload for both your viewing tonight!

  37. #37
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Just seen this other post Pete. Thanks very much Pete, you shouldn't have put in so much effort if you are so close to your holiday (unless you wanted to avoid packing!). I really appreciate your time. Enjoy your holiday, safe travels!
    Last edited by STUARTXL; 03-09-2017 at 02:06 PM.

  38. #38
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    Viola! The finished product attached! Document is password protected except for cells that require user entry. I've only protected it for the sake of use at my company, so I've no qualms divulging the password here. The password is abcdefghi.

    Wow, that was overly complex but I think this is a really fluid document that has real longevity, whilst demanding only minimum user input. I was going to add in an 'Instructions' tab so that all other users on here can benefit, but I'm exhausted (I guess you are too!) so that will come at a later date.

    In the meantime, gaze upon our [mainly both your] masterpiece!!

    EDIT: New file attached at 18:13 GMT on 09 March 2017 due to the discovery of a minor error.
    Attached Files Attached Files
    Last edited by STUARTXL; 03-09-2017 at 02:13 PM.

  39. #39
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,252

    Re: Help Requested in the Creation of a Company Calendar

    I only hope this is "maintenance" free: I would hate to come back in 6 months and decipher the formula in "MASTER"!!!!

  40. #40
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Re: Help Requested in the Creation of a Company Calendar

    It was designed to be maintenance free so in all likelihood, it's not haha! But in all seriousness the only issue I foresee is the limitation in the 'Annually' and 'Bi-annually_Two' strands of the formula, which are limited to working for 60 months and 48 months from the date in column AA respectively).
    Other than this, I think it is capable of working successfully on it's own.

    I noticed one other problem but it's not for tonight; on the calendar the user has the option to mark a task/deliverable as completed by placing a 'Y' in column J (should be drop down but this can easily be edited). The impact of marking a task as completed is that it no longer appears on the 'Reminders' list (you don't want to see a reminder for a task already completed).
    As the 'completed' status are static i.e. remain on the same line within the calendar, this feature works, on the premise that the deliverables also never change lines. But the deliverables can change lines quite easily if the number in cell F5 of the 'Calendar' tab changes. FYI the number in F5 pulls through from AB47 of the 'Master' tab and represents the largest number of deliverables due on any one day in the year.
    As the deliverables can change lines but the 'Completed' status remain static, deliverables paired with a completed status can easily grow out of sync. I need to find a way of keeping them synced.

    I guess one easy way to overcome this is to set the number in cell F5 as a large number e.g. 30 as it is highly unlikely any one day will ever have 30+ deliverables falling due on it hence the number of lines per day will never increase. I think I'll do this actually....

  41. #41
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Quote Originally Posted by STUARTXL View Post
    ... I need to find a way of keeping them synced ...
    The problem is that you are using what is essentially a (variable) report from your data (i.e. output) as a data entry form, but the two things are not linked. You can have a fixed number of lines per day, as you suggest, but the days themselves are variable as you can change the year, and in that case you would want the data input to be wiped. Excel in this case is not working as a database would, where you would allocate that input to a record and (separately) display the record (or fields of it).

    I'm glad you were able to compile the composite frequency formula - mine would be a bit shorter as I had 2 generic formulae and 3 individual ones, instead of 12 individual ones, but both end up as "monsters" and will be difficult to maintain in future. I'll test yours out a bit later on if I get chance.

    Pete

  42. #42
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Help Requested in the Creation of a Company Calendar

    Deleted - I thought the previous post had got lost (just went to a new page)

    Pete

+ 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. [SOLVED] Automatically copy individual company rows into separate company sheet
    By rajeshn_in in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-24-2016, 03:24 AM
  2. [SOLVED] Calendar Creation Weekday Only
    By Winship in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2014, 10:04 AM
  3. Calendar creation from dates on various Worksheets
    By wrestlingnrj in forum Excel General
    Replies: 3
    Last Post: 03-22-2013, 07:05 AM
  4. Monthly calendar creation
    By haali in forum Excel General
    Replies: 6
    Last Post: 11-14-2011, 09:04 AM
  5. Calendar Creation
    By COMTEC in forum Excel General
    Replies: 2
    Last Post: 11-15-2010, 01:25 PM
  6. company calendar: start date problem
    By Tim Marsh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2006, 03:20 PM
  7. [SOLVED] Calendar Creation in Excel
    By Duncan Edment in forum Excel General
    Replies: 7
    Last Post: 03-02-2005, 06:06 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