+ Reply to Thread
Results 1 to 13 of 13

Looking for logic to develop macro

  1. #1
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Lightbulb Looking for logic to develop macro

    I am looking for an solution in which user inputs below details n I will get following output as Table-2.

    I have 4 parts name - A,B,C,D with priority as 1,2,4,3.
    Rule is that if we load part name - A on a machine then it can maximum produce 50 qty, after that compulsory batch needs to be changed, because Tools/ Die for Part Name - A needs to be reconditioned.
    So we will switch over to next priority i.e. part name - B, again it will produce 50 qty after that it will be take for reconditioned.
    Till that time Part Name - A tool will be ready, so will manufacture part name - A.

    Refer below table 2 for more details.


    INPUT by user ( TABLE - 1 )
    Part Name Total Order Qty Priority Maxi. Batch Qty.

    A 100 1 50
    B 150 2 50
    C 250 4 50
    D 175 3 50


    OUTPUT ... Table - 2
    Priority Part Name Produced Total Manufactured Total Balance
    1 A 50 50 50
    2 B 50 50 100
    1 A 50 100 0
    2 B 50 100 50
    3 D 50 50 125
    2 B 50 150 0
    3 D 50 100 75
    4 C 50 50 200
    3 D 50 150 25
    4 C 50 100 150
    3 D 25 175 0
    4 C 50 150 100
    & above cycle continues.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looking for logic to develop macro

    Best to upload an example of want your wanting. Dont need the real data but need the exact layout of the real data.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    Please find attached file
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    Can anybody help me ????

  5. #5
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    Please help

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looking for logic to develop macro

    I'm not getting what your request is. Can you add some notes to the output sheet that shows the logic

  7. #7
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    The selection of the part name should be based on priority.
    For e.g. For part name "A" - priority is 1, so it will be produced first.
    Then for part name - "B" - priority is 2, so it will be produced after "A" is finished.

    Secondly,
    During each line item, maximum it can produce is 50 Qty.
    e.g. Suppose we start from part "A" is will produce 50 Nos. so Total remaining will be "50 - 100 = 50 Qty."
    After part "A" finished it will automatically select part "B", because we have set priority "B" as 2.

  8. #8
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    If you required any graphical / schematic presentation then i can prepare n give you.

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looking for logic to develop macro

    That would help.

  10. #10
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    Please find simple layout.
    Attached Files Attached Files

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looking for logic to develop macro

    I will look at this as soon as I can, when I get home. Getting ready for a 12hr work day. Or if anyone else wants to chime in feel free.
    Last edited by mike7952; 10-28-2014 at 05:08 PM.

  12. #12
    Registered User
    Join Date
    05-11-2013
    Location
    Gujarat
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Looking for logic to develop macro

    Can anybody help to solve this.....

  13. #13
    Forum Contributor
    Join Date
    10-16-2014
    Location
    Center Line, Michigan, United States
    MS-Off Ver
    MS Office 2013
    Posts
    139

    Re: Looking for logic to develop macro

    Hello vishpuj,

    I still don't exactly understand your request. If you can walk through the logic step by step, I'm sure that I or someone else can program the macro.
    Please click the star (add rep) if I helped!

+ 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 develop a macro so that it runs in one xls (not xlsm) worksheet only?
    By Bernard46 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2012, 05:27 PM
  2. Develop advanced search macro
    By talltim125 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2010, 06:18 PM
  3. Need to develop a macro that will make an assortment
    By alogoc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2009, 08:21 AM
  4. Develop a System using Macro in MS Excel 2007
    By hally in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-03-2008, 11:55 PM
  5. How to develop a calculator using Excel Macro via VBA
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2006, 09:10 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