+ Reply to Thread
Results 1 to 12 of 12

Improve Forumla

  1. #1
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Improve Forumla

    Hi,

    Is there anything i can do to improve this formula,

    Please Login or Register  to view this content.
    i currently use this on a sheet 149,200 times so as you can image is affecting performance, i have already reduced this by using the let function, but still feel more could be done, the header is the date of the year, and each row is a colleague, here is an example string used for the rota pattern. this is taken from another sheet, that unless changed remains fairly static, but needs to be easily updateable.
    000800800800800800000000080080080080000800800800800000000800080080080000080080080000000800800800800800000000080080080080000800800000000800800800080080000080080080080000

    Thanks
    Last edited by jynxy; 08-27-2022 at 06:05 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    Welcome to the forum.

    Hard to say without seeing a sample workbook.

    What is the LET version?

    If you are using LET, then you must have either 365 or Excel 2021, so please update your profile.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Improve Forumla

    Hi,

    Sorry have now updated to Office 365

    If you need the workbook i will look to create a cutdown version as quite large at present. do you still need this ?

    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    Yes, please. We can't suggest improvements without seeing the data layout.

  5. #5
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Improve Forumla

    Please see file attached, i have cutdown the data on this, except on the months page, but you will get the idea.

    Anything that can be done to greatly improve this would be most helpful.

    Thanks


    Rota-Cutdown.xlsb

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    Thanks - will have a look presently, but you'll need to tell me where to find the formula.

    You will also need to explain in WORDS what it is doing - I am not going to reverse engineer it to find out (sorry).

  7. #7
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Improve Forumla

    Sorry, you will find this on the shifts tab. I3

    Its a bit complicated to explain, it should be getting the rota pattern and finding if they are on shift for that day, which is found on the team tabs, then it checked the relevant day to see if there is holiday etc, so on 1/1 you will fnd this on the jan tab under the 1st. this should then create the relevant string with the detail so for example ROT080OVT000SSI000SSO000SDS000HOL080LID000UNP000FLD000MAT000LIS000CBR000ABS000
    Last edited by jynxy; 08-27-2022 at 08:24 AM.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    Right.

    Please explain in WORDS what the formula does.

  9. #9
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Improve Forumla

    See above thanks

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    OK. I'm sorry, but I don't have time to reverse engineer the formula - that would take me a couple of hours, probably. You know the logic. I think I am going to have to pass on this one - sorry.

    I hope someone else has the time to unpick it in order to help you.

  11. #11
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Improve Forumla

    Hi,

    Here is a best i can do for the breakdown AliGW

    This starts on the shifts sheet Cell I3

    * Check if A3 is empty, if not continue, else get rota pattern using this forumula and add dummy data to end.
    Please Login or Register  to view this content.
    * check if Jan E6 is empty, if not continue, else blank

    * using LET define d_patt, first check on Jan sheet to see if an entry has been made for overtime, holiday etc. then get abreviated code, then check to see how many hours in each of the 3 columns on the jan sheet this will make something similar to HOL000

    * this then moves onto createing the full length string, first get Rota so will Genereate ROT080 then check to see if any hours for OVT if so then defice OVTxxx if not use OVT000, then move onto the next so SSIxxx if no hours then SSI000 and so forth.


    Not sure i have explained enough, but in a nut shell,

    Get the Rota Pattern from Teams Tab, BHR4 calculate the date needed and get the 3 shift i.e 080 this should then create ROT080 (which is 8 hours on the late shift, 0 hours on early and night shift)
    Then check JanE6 to see if any dropdown selected, get the abreviated code so Holiday = HOl and Overtime = OVT, then the 3 cells before are the hours this will then generate HOL080 this is then used to create a full string. if any of the abreviations are not selected then use 0's so if no MAT then it will be MAT000m this is then joined togehter for example

    ROT080OVT000SSI000SSO000SDS234HOL000LID000UNP000FLD000MAT000LIS000CBR000ABS000

    This shows ROT080 which is 8 hours on late shift, then SDS has 234 and all the others have nothing 000

    Hope i have explained enough.

    Thanks

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Improve Forumla

    Thanks for the extra information - someone will, I am sure, be able to get their head around it, but it's too much for me to be able to contemplate today.

+ 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. VBA - Improve formula.
    By ozstrik3r69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2018, 02:06 PM
  2. Make forumla lookup value rather than forumla
    By Jbraviator in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-09-2015, 01:00 PM
  3. [SOLVED] Is it possible to improve the functions UDF
    By bines in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 08:20 PM
  4. Conditional Forumla with Forumla assigned- Help needed
    By MarkoPolo in forum Excel General
    Replies: 3
    Last Post: 03-06-2014, 06:46 PM
  5. Need your help to improve
    By baba4005 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 04-19-2012, 03:32 PM
  6. Help to improve macro
    By unni5959 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-19-2005, 07:05 PM
  7. Replacing a cell's forumla with the forumla's results?
    By Mooncalf in forum Excel General
    Replies: 2
    Last Post: 01-04-2005, 12:35 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