+ Reply to Thread
Results 1 to 14 of 14

VBA code for store inventory transfers

  1. #1
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    VBA code for store inventory transfers

    Experts,

    I just found the old thread: https://www.excelforum.com/excel-for...ml#post4358551
    and I need your help to edit the code from file attached into the format I need
    Could anyone can edit the code for me for the file attached?
    I have explained the expected result on file attached. Thanks

  2. #2
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    Anyone can help?

  3. #3
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    Could you pls help? Thx

  4. #4
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    anyone can help?

  5. #5
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA code for store inventory transfers

    Maybe something like this ?
    Please Login or Register  to view this content.
    Tested only based on the data in your sample workbook.

    2020-07-18_18-17-04.gif

    I think the code can be shorter, but I have my headache to think about it more .
    Last edited by karmapala; 07-18-2020 at 06:30 AM.

  6. #6
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    @karmapala,

    yes, thats what I need, but could you pls help to move the result to output sheet ? also could you pls add the field for color and size as well as attached file?

  7. #7
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA code for store inventory transfers

    Quote Originally Posted by halimgunawan View Post
    @karmapala,

    yes, thats what I need, but could you pls help to move the result to output sheet ?
    but there is already data in your output sheet ?


    also could you pls add the field for color and size as well as attached file?
    How do I know that from shop bla to shop blu the color is ble and the size is blo ? .
    I thought the value in column color and column size will be manually typed by the user after run the macro.

    Ooops !
    Sorry, just download your other attachment. LOL
    Last edited by karmapala; 07-18-2020 at 06:39 AM.

  8. #8
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    @Karmapala, the output sheet is the result of previous code, so you can erase it.

    also for the color and size, I have added the information into new attached file above...

    may I know if the coding will cover unlimited rows and columns? what I mean is if I add more products and shop, the coding will automatically calculate based on the updated data right?

  9. #9
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA code for store inventory transfers

    Like this ?
    Please Login or Register  to view this content.
    2020-07-18_18-50-43.gif

    if I add more products and shop, the coding will automatically calculate based on the updated data
    As long the added products and shop is always in a consecutive column/row yes the macro can still run.
    The macro assumed that the column for shops will always start from cell D1 to the end right of the column which is the last shop. (please remember, no blank column in between).
    The macro will stop the loop once it finds out that the range from cell D(n row) to cell LastColumn of the Shop (n row) has nothing inside it (empty), countA = 0.
    The macro assumed that the total sum of the range from cell D(n row) to cell LastColumn of the Shop (n row) will always be zero / nol.
    The macro must be run while on sheet Sheet1 (2) active, it will throw an error if the macro run where the sheet Output is active.
    Last edited by karmapala; 07-18-2020 at 07:04 AM.

  10. #10
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    Ok @karmapala, thanks so muchhh..

  11. #11
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA code for store inventory transfers

    You're welcome. Glad that you're helped .

    BTW, the code is not clean.
    There are some lines which are repeated for three times.

    Let's hope our senior can give another code solution which is nicer, shorter, faster and better .
    Last edited by karmapala; 07-18-2020 at 07:01 AM.

  12. #12
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    @Karmapala, do you mean the lines repeated on output sheet?

  13. #13
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA code for store inventory transfers

    Quote Originally Posted by halimgunawan View Post
    @Karmapala, do you mean the lines repeated on output sheet?
    No... what I mean is that in the code, there a are some lines which are repeated a few times.

    Quote Originally Posted by karmapala View Post
    Tested only based on the data in your sample workbook.
    After I made a random data variation with positive/negative number for the shops,
    it turned out I made a mistake as the code before still not correct with the data variation I made.

    Please try this one :
    Please Login or Register  to view this content.
    Last edited by karmapala; 07-18-2020 at 12:53 PM.

  14. #14
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    2019, MS 365
    Posts
    51

    Re: VBA code for store inventory transfers

    @Karmapala,

    pls see my new attached file...
    I added stock field WH
    Attached Files Attached Files
    Last edited by halimgunawan; 07-18-2020 at 03:20 PM.

+ 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. [SOLVED] VB Code to adjust Inventory count by transfering from one store to another
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2019, 11:15 PM
  2. Access database for inventory transfers b/w locaitons
    By chnssrinivas in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-04-2019, 09:50 AM
  3. [SOLVED] Formula to create store by store inventory transfers
    By DamianTaylor in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-08-2016, 08:37 AM
  4. How to add up inventory in store
    By ikm-99 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2015, 01:52 PM
  5. Replies: 5
    Last Post: 04-30-2014, 05:46 PM
  6. Replies: 0
    Last Post: 04-29-2014, 01:01 PM
  7. i need help with a inventory system i want to set up for a shoe store
    By shahid_110 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-04-2012, 10:39 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