+ Reply to Thread
Results 1 to 6 of 6

Pattern Building VBA Code - Working code, would like to use cleaner code

  1. #1
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Pattern Building VBA Code - Working code, would like to use cleaner code

    Good Day,

    I have a VBA Macro that is used to generate shift patterns based on the number of required shifts for each day of the week.

    The code that I wrote works, but I'm sure it can be significantly trimmed down to do the same function with less code. I had a hard time looping the pattern back around to the earlier days of the week, so this is the best I can come up with.

    I have attached my sample workbook, to see if anyone can possibly show me a better solution to the problem.

    Thanks for anyone who is willing to help me.

    Chris
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Pattern Building VBA Code - Working code, would like to use cleaner code

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Pattern Building VBA Code - Working code, would like to use cleaner code

    Wow, thats great.

    Thanks so much.

    Chris

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Pattern Building VBA Code - Working code, would like to use cleaner code

    any time. Please mark it as solved otherwise tell us what needs to be tweaked...

  5. #5
    Registered User
    Join Date
    03-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Pattern Building VBA Code - Working code, would like to use cleaner code

    Actually, it doesn't quite work. Seems to ignore the 7th day. It never puts a day off on the 7th day, which makes cycle pattern break.

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Pattern Building VBA Code - Working code, would like to use cleaner code

    Let me take a closer look by comparing the parameters to your original...

+ 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. Problems installing VBA CODE CLEANER
    By bulina2k in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-04-2014, 09:11 AM
  2. [SOLVED] Cleaner code
    By madhatter40 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2013, 03:33 PM
  3. Using array for cleaner code
    By rajeshkp in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-05-2013, 01:01 AM
  4. [SOLVED] cleaner code
    By scancool in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2012, 04:07 PM
  5. HTML Code cleaner
    By heren in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2005, 03:05 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