Results 1 to 3 of 3

Thread: Sub-Routine problems

  1. #1

    Sub-Routine problems



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Sorry, I'm not yet familiar with sub-routine (or functions). I hope someone can help me "translate" this into one, and how do I call/activate it

    Suppose I have the following in my MainSheet:

    A1 B1
    15 = small(Emp1!c4:c50,A1)
    10 = small(Emp2!c4:c50,A2)
    .
    .
    5 = small(Emp50!c4:c50,A50)


    TIA

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,829
    Articles
    0
    Excel Version
    O365
    Why bother, SMALL does the job. UDFs are usually slower than formulas.

  3. #3
    Quote Originally Posted by Bob Phillips View Post
    Why bother, SMALL does the job. UDFs are usually slower than formulas.
    Thanks....but actually, it goes on with another IF-THEN formulas, which is actually a bit "hard" to explain. But anyways, here it is:

    Alloc1 Start 1 End 1 Alloc2 Start 2 End 2 Alloc3 Start 3 End 3
    Employee 1 (Sheet1) 5 1:00 x 7 x x
    Employee 2 (Sheet2) 4 2:00 x
    Employee 3 (Sheet3) 8 1:00 x 5 5:00 x . .


    **END TIME is based on the particular time the last case for that "batch" is done. (ex. Employee 1's 7th case was done at 5:06)
    **START TIME is provided, BUT, if the END TIME from previous "allocations" is greater, the END TIME will be used as the START TIME (ex. Employee 3's START TIME)
    I was able to do it with a simple IF-THEN command, yet, it can only be done only up to 4 alloc (or allocations), beyond that, I already get an error (something about too many arguments, etc). I'm not familiar that with procedures (or functions), so, I was hoping someone will be able to help me translate it into procedures (or functions).
    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
  •