Results 1 to 20 of 68

Thread: Advice needed to speed this code.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    VBAX Tutor
    Joined
    Sep 2009
    Posts
    231
    Location

    Advice needed to speed this code.

    Hi Paul,

    this is what am trying to figure out, how to do this on VBA instead of using the formula.

    P45Cal: thanks again for the help. replying:

    msg 3: yes it's an error we can remove one of the check on it.

    Msg 6: No it shall not have duplicate as 1 row represent one dept therefore if one dept is declare it shall not be duplicated.

    Msg 7: -SUMIF($AM$58:$AM65,$AM66,BE$58).

    Normally this sumif is suppose to do the calculation based on the capacity set by dept from rows AV5:AV56. example.

    if Cut Capacity is 6,500

    then the calculation shall look like that:

    Cut 6500 6500 6500 6500 6500 6500 6500
    order total mins Minimum mins block date still to load Date Mon-09-May Tue-10-May Wed-11-May Thu-12-May Fri-13-May Sat-14-May Mon-16-May
    1 15000 4000 10-May 0 4000 4000 4000 3000
    2 12000 3500 10-May 0 2500 2500 2500 2500 2000

    It shall check if there is still capacity to load and by how much like order 1 has already taken 4000 mins therefore the balance available mins is 2500 which is allocated to order 2 as even the Minimum mins to load is 3500 it can allocate only 2500 mins.


    This is what this sumif is suppose to do about. Well I don't know if am doing it right that is why i need some advise and recommendations. Am attaching a file to illustrate an example of that.

    I hope this can help you to figure out what the calculation is doing.

    thanks sir for helping me for this problem.

    vishal
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •