+ Reply to Thread
Results 1 to 2 of 2

How can I optimize blocks creation?

  1. #1
    Registered User
    Join Date
    04-08-2022
    Location
    Montreal Canada
    MS-Off Ver
    Microsoft 365
    Posts
    15

    Question How can I optimize blocks creation?

    Hey everyone,

    I am having trouble trying to separate my data into blocks.

    I currently have 2 columns: The first is groups (A,B,C) and the second is time (in min).

    I would like to separate my data into blocks given constraints (i.e. total time <= 60; and quantity <= 5)

    The results I would like to get is the block ID for each row. (i.e. A1, A2, B1, B2, C1, ...)

    Is it possible to do this using VBA?
    Attached Files Attached Files
    Last edited by TheVuongster; 04-08-2022 at 01:29 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: How can I optimize blocks creation?

    Hello TheVuongster and Welcome to Excel Forum.
    You may want to look at PietBom's post (#5) in the linked thread and see if the code used could be modified to include two constraints (time and quantity).
    https://www.excelforum.com/office-36...ml#post5653942
    As I don't use VBA I can't offer further help.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. How can I optimize my code
    By viettest in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-08-2019, 05:02 PM
  2. VBA to optimize your VBA possible?
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2017, 05:37 AM
  3. How to optimize
    By jonelamora in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2012, 02:17 AM
  4. Using macros to identify blocks of data and summarise those blocks
    By gophbeav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2012, 04:35 AM
  5. Optimize Rod Cut Lengths
    By Ari88 in forum Excel General
    Replies: 0
    Last Post: 08-25-2011, 10:40 AM
  6. Excel file creation dates do not match the windows creation date.
    By alexthapyro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2011, 12:14 PM
  7. Excel 2007 : Title blocks and x+y blocks!!!!!!
    By ginabgirl in forum Excel General
    Replies: 1
    Last Post: 11-10-2008, 05:47 PM

Tags for this Thread

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