+ Reply to Thread
Results 1 to 7 of 7

Looking for help on a Loop to find and update stock sheet quantities

  1. #1
    Registered User
    Join Date
    12-09-2015
    Location
    Kansas
    MS-Off Ver
    MS Office 10
    Posts
    6

    Looking for help on a Loop to find and update stock sheet quantities

    Hello. I am trying to run a macro that automatically updates our stock sheet.

    Basically what I have is sheet 1 (Stock Sheet) with a product range in Column A, a +/- column B and column C is the stock quantity.

    On sheet 2 (Scanned) are the scanned product codes (incoming stock) in column A and the scanned quantity in B.

    So ideally the macro would loop through matching each incoming product code on sheet 2 with the master on sheet 1 and then input the corresponding new quantity in the +/- column next to the product code. Once there I have a command button to add/subtract it against the total.

    I have been trying to embed the .Find command into a For Each loop to accomplish this but so far have not had much luck. Is this the best method to go about this?

    Here is the code I have been working with to give you an idea.
    Please Login or Register  to view this content.

    I have attached a sample spreadsheet which shows how the data is set up.

    Any input on this is much appreciated and thanks for your time.

    Copy Simple Stock Sheet.xls

    -James
    Last edited by alansidman; 12-15-2015 at 03:40 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Looking for help on a Loop to find and update stock sheet quantities

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Looking for help on a Loop to find and update stock sheet quantities

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    12-09-2015
    Location
    Kansas
    MS-Off Ver
    MS Office 10
    Posts
    6

    Re: Looking for help on a Loop to find and update stock sheet quantities

    Thank you for correcting my post alan, my apologies. I have reviewed the rules and will bear them in mind in the future.

  5. #5
    Registered User
    Join Date
    12-09-2015
    Location
    Kansas
    MS-Off Ver
    MS Office 10
    Posts
    6

    Re: Looking for help on a Loop to find and update stock sheet quantities

    Mumps!! Thank you! This is what I was missing, it's working perfect for me. I really appreciate your help, you are going to make me a popular guy at work now.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Looking for help on a Loop to find and update stock sheet quantities

    Glad to help.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Looking for help on a Loop to find and update stock sheet quantities

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. i am new to excel and i am trying to update a stock sheet
    By trinimoses in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-09-2014, 11:45 PM
  2. Macro to update balance sheet. Trying to loop until row is blank & copy/paste.
    By sneaders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2014, 10:44 PM
  3. Automatically deducting quantities from stock
    By Aamee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-21-2014, 03:27 PM
  4. Replies: 1
    Last Post: 04-24-2013, 08:53 PM
  5. Auto Update Stock Quantities
    By Dougie8 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2012, 02:05 PM
  6. basic stock take sheet update
    By nr6662 in forum Excel General
    Replies: 6
    Last Post: 01-27-2011, 04:30 AM
  7. Macro to update quantities in range
    By additude in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-24-2008, 11:52 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