+ Reply to Thread
Results 1 to 11 of 11

Macro for tracking inventory

  1. #1
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Macro for tracking inventory

    Hello! I'm the manager for a coffee house and lounge and I'm trying to create a macro to help us keep track of inventory.

    This is what the inventory spreadsheet looks like:

    Untitled.jpg

    What I would like to happen is when the value under the Need column reads "x", I would like for the first cell in the row to be copied and pasted to another sheet, titled "Shopping List." Essentially, I just want a list created of the items that are marked as needed. I'm having trouble getting the loop to continue down the column and if the column value is "x", copy the first cell in the row. I've tried a multitude of things already, and this is all I can come up with thus far:

    Please Login or Register  to view this content.
    I'm no expert, and any help would be appreciated!
    Last edited by Leith Ross; 06-23-2013 at 09:08 PM. Reason: Added Code Tags

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro for tracking inventory

    How about this?

    9119771571_26be4dbde8_z.jpg
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Macro for tracking inventory

    Says something about array error on the UBound line.

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro for tracking inventory

    Post a sample workbook with sensitive data removed, but with relevant data still in there.

    LOL, Kudos for typing that out! I was joking around and was about to post the code correctly.

  5. #5
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Macro for tracking inventory

    Sample attached.
    Attached Files Attached Files

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro for tracking inventory

    Where are the x's and how do they appear on the sheet? What I mean is, do they appear through conditional formatting or an event macro, etc? And do you want the list separated into the products groups?

  7. #7
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Macro for tracking inventory

    The x's would be input as my employees are doing inventory count everyday. They put them in manually in the boxes under the columns labeled "Need."

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro for tracking inventory

    OK try this,

    This will only work on the daily count page for now. Click the button next to the Milk column.
    Please Login or Register  to view this content.
    Edit: The forum is not allowing attacthments, so you will have to paste this in the module and run it yourself

  9. #9
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Macro for tracking inventory

    That worked! This would probably be a lot easier if I put all of the items in the same column rather than adjacent.
    Can I just change the name now to work for each of the Sheets?

  10. #10
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro for tracking inventory

    It does not matter that they are not in the same row, I accounted for that, so leave as is.

    If you want to use a separate macro for each sheet, use this,

    Please Login or Register  to view this content.
    And if you want one macro to do all the sheets use the code below.
    But, there is one cavet, make sure the page layout is exactly the same. Eg, No spaces between groups,Have the group names start in A5. The size of the lists does not matter as the macro will tak care of that. My suggestion would be to copy the Daily sheet and then change all the contents to suit weekly/monthly data accordingly.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-23-2013
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Macro for tracking inventory

    YAY thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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