+ Reply to Thread
Results 1 to 5 of 5

Order/Inventory worksheet

  1. #1
    Registered User
    Join Date
    06-26-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    69

    Order/Inventory worksheet

    Hi Excel gurus,

    I hope someone can point me in the right direction.

    I want to do the following... I have a table like in the picture.
    I have orders for different products, some with only one line and some with multiple lines/items.
    I have the quantity ordered and the quantity in stock for each item.

    I look at the first order, 1111 and check the availability. We have enough in stock to ship the order.
    Now I want to validate order 1111, meaning changing the color of this line to ‘green’ and more important, debit the used amount for every product in the ‘in stock’ column.

    So for this example... I would enter 1111 and click on ‘validate’. This should put the 2 lines for 1111 in green and debit 50 from the ‘in stock’ column from every line with ‘Apple’ in the ‘item’ column. Same thing for the second item in this order; ‘Orange’.

    Now I have no idea how to do part do debit the used quantity from the stock column for every item.
    I appreciate any hint!


    Capture.JPG
    Attached Files Attached Files
    Last edited by gombi; 06-19-2014 at 12:44 PM. Reason: mistake

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

    Re: Need some help to archive a complex Marco problem...

    I would suggest creating an inventory system (master table, transaction table, order form, purchase order form). would you like me to suggest and/or create it for you?

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Need some help to archive a complex Marco problem...

    Hello gomb,

    You will get more responses by posting your workbook. Most people are not inclined to recreate your what you have already done from a picture.


    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    06-26-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Order/Inventory worksheet

    I guess I need to loop through column B, finding all lines with 1111, looking up the item and qty ordered. After that look up any line containing the item and debit the stored amount from the stock column.
    How can I do the loop and store the needed data in an array?

    Thats what I have so far. I'm able to find each line but I dont know how to get the item and qty of the same row.
    Please Login or Register  to view this content.
    Thanks,
    Last edited by gombi; 06-19-2014 at 02:41 PM.

  5. #5
    Registered User
    Join Date
    06-26-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Order/Inventory worksheet

    So, I have a little more now. I know how to do it and I'm on my way, but now I have a little issue.

    Could someone tell me why the 2nd For loop is not finding the item? I dont get it!

    Please Login or Register  to view this content.
    Edit:
    I know now what the issue is but I still dont know how to fix that.
    I'm not getting the right cell address as the following line does not select the range. Why?

    Please Login or Register  to view this content.
    Thanks,
    Last edited by gombi; 06-20-2014 at 10:57 AM.

+ 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 to create a Marco to run same Marco run on everysheet.
    By chriskingkiller in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-09-2013, 02:53 AM
  2. marco problem in excel 97
    By Jimmy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2006, 04:35 AM
  3. COMPLEX PROBLEM
    By elephant in forum Excel General
    Replies: 2
    Last Post: 04-03-2006, 10:25 AM
  4. Excel Marco Startup Problem: Run-time Error 91
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2005, 04:50 PM
  5. Pivot table marco problem!
    By matthewwookie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2005, 04:31 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