+ Reply to Thread
Results 1 to 5 of 5

Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?)

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    Blackwater, Australia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?)

    Hi Team,

    What I am looking to achieve is having a a block of data which includes a rather lengthy offset equation (line 6) move automatically with the current month so that when the month ends it automatically moves to the next months block of data and so on.

    At the moment come months end I look to see at what point the new month starts and ends, then use the find and replace function to add the amount of lines (days in the month) required to take me to the next month. This is not an issue in itself, but my roster being what it is sometines I do not get to do this update until a week of the new month has passed.

    Is there a way of slaving this to the computer time so that when Midnight ticks over, when the database opens in the new month, it moves the selection to reflect the current month?

    The actual selection will never change. I am looking at sumproducts and patterns for the current month, and the previous 12 months.

    I have seen something like SUMPRODUCT(--(DATESINMONTHS,=CURRENTMONTH) however, I am not sure how this is supposed to wrap around the equations in lines 3-6 that I am currently using to determine patterns.

    I have several options and am not fussed on which one ends up being used.

    Firstly, having the computer do it automatically would be the most preferred. This way there is no other user input to stuff up.

    Second option is to manually tell the computer to look at a specific month and them manually enter that month in (or slave it to the computer which then makes it automatic I guess?)

    Third option is to determine if there is a way of moving the infomation block down the required number of lines that will corrospond to the amount of days in the current month.

    Fourth option would be to have the equations always look between lines 7 and 38 (being 31 days) for days absent in current month and between lines 7 and 1000 for patterns in the previous 12 months. What I would need to do then is delete the oldest months worth of data.

    I have attached an example of the spreadsheet being used. Lines 3-6 are the calculation lines and would be of the most interest.

    I do recall Ben_Hessel said that it was rather simple and could be done fairly easily, but I seem to have gotten a bit side tracked since that post and did not seek further information. Now I am quite stumped.

    Thanks Guys,
    Attached Files Attached Files
    Last edited by Delta337; 04-10-2014 at 09:36 AM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?

    Here are some options for rows 3 through 5
    These regular formulas, copied across, return the values you're looking for
    Please Login or Register  to view this content.
    Is that something you can work with?

    (Row_6 is a beast. I'm afraid I probably won't be able to address that one today.)
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    10-12-2013
    Location
    Blackwater, Australia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?

    Hi Ron,

    Thanks for the very swift response.

    I am always amazed at the things that you guys can write and this is definitely something that I can work with. I am away from work for the next few days, but will test this as soon as I am able.

    I agree that line 6 is a beast. This line is used to look for specific patterns. and then count the occurrences. While long is actually quite effective. Maybe not as efficient as it could be so feel free to re-write the algorithm (if it able to be re-written) to suit.

    Thank you for your efforts.

    Warm regards

  4. #4
    Registered User
    Join Date
    10-12-2013
    Location
    Blackwater, Australia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?

    Hi Ron

    Sorry I took so long to get back to you.

    I have just tested this at home as I do not have sufficient privileges to muck around with the system dates on the work computer. Worked like a charm. Thank you so much. This will save much time and effort when I return. Having the spreadsheet automated means that I do not have to adjust everything at the beginning of each month. This can sometimes be a few days after the 1st day of the month rolls around. This then leaves the other supervisors working on incorrect information.

    Have you (or anyone else out there) had the opportunity to wrap their heads around Row 6. As commented - this one is a beast. It essentially looks for patterns of sick days directly before or after annual Leave with a few minor variations like Ex days. Any assistance to automate this to the system date like you have with the code suggested for rows 3, 4 and 5 would be very much appreciated.

    How do I mark this as solved with stars?
    Last edited by Delta337; 05-02-2014 at 07:59 AM.

  5. #5
    Registered User
    Join Date
    10-12-2013
    Location
    Blackwater, Australia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Slave Dynamic offset array function to a current mth & 12 mth period (Correct wording?

    Got it. (I think). Hopefully I have added to your reputation.

+ 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] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  2. Dynamic Table with scrollbar using Offset function
    By joyhampton in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-04-2013, 08:45 PM
  3. Dynamic Chart - Offset function
    By jantonio in forum Excel General
    Replies: 2
    Last Post: 10-17-2011, 02:49 PM
  4. Looking for correct array function.
    By steven314 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-05-2007, 02:31 PM
  5. Offset function and Dynamic Ranges
    By SandyLACA in forum Excel General
    Replies: 2
    Last Post: 08-02-2006, 06:07 PM

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