+ Reply to Thread
Results 1 to 21 of 21

Formula to create store by store inventory transfers

  1. #1
    Registered User
    Join Date
    03-15-2016
    Location
    Melbourne
    MS-Off Ver
    XP
    Posts
    6

    Formula to create store by store inventory transfers

    Hi Everyone,

    This is the first time I have ever posted to an online forum after having been a long time reader! I am hoping someone is able to assist with a rather complex request. I have included the data in the attached spreadsheet as well as the output we are seeking to get. In short we need help with a formula to prepare a list of items that Shop 1 needs to transfer to Shop 2, Shop 3, Shop 4, Shop 5 etc and then a list of items Shop 2 needs to transfer to Shop1, Shop 3, Shop 4, etc.

    Kind regards,

    Damian
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    Hi
    I was in the middle of the code. Just wanted to know if there can be a situation where 2 items are expected to be delivered?
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Registered User
    Join Date
    03-15-2016
    Location
    Melbourne
    MS-Off Ver
    XP
    Posts
    6

    Re: Formula to create store by store inventory transfers

    brilliant question yes it is possible for a store to receive 2.kind regards Damian

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    phew.
    Not so easy as I thought in a first place.

    I've create output in SECOND sheet so you can add/remove more store or products.
    You a flexible with it as well as names of such stores/products.

    Here, try this. Press button next to the table and find result in Output sheet.

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    In main sheet you can write anything as long as data AROUND table is empty.
    Don't write in output sheet as it's deleted each time you run macro.

    Or copy paste your data to new sheet or main sheet in case you want to preserve some comments.

  6. #6
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    Hi
    Apologies for the delay. Actually the problem was more complex as it seemed to be.
    Here is the macro-
    Please Login or Register  to view this content.
    Check file attached. It doesn't produce exactly same results but still may help.

  7. #7
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    I forgot to mention that you need to specify first 3 variables in the macro as specified.

    Also, I Made some changes in the macro-
    Please Login or Register  to view this content.
    Last edited by sourabhg98; 04-07-2016 at 07:14 AM.

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    @zbor
    As specified by Damian there is chance of having more than 1 for expected delivery.
    That code doesn't seem to work if we have say -1,-1,-2,-1,3,0,1,0,1 respectively for the 9 shops.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    Quote Originally Posted by sourabhg98 View Post
    @zbor
    As specified by Damian there is chance of having more than 1 for expected delivery.
    That code doesn't seem to work if we have say -1,-1,-2,-1,3,0,1,0,1 respectively for the 9 shops.
    Thank you for that.
    I've worked only with -1 values.

    Fixed now.

  10. #10
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    No problems

    I looked at your code and understood nothing
    I don't know why it is always easier to make your own code rather than interpreting other's code.

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    It's not easy to follow it because I don't know how to explain it shortly

    I would just suggest for your code to declare sheet names at the top since in that case, if you change sheet name you need to do that only at one place.

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    I'll try to explain:

    First delete old sheet and isert new one:

    Please Login or Register  to view this content.
    Then create output data:
    Please Login or Register  to view this content.
    That will result with shoprs, products and items

    Please Login or Register  to view this content.

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    Then insert "Expect a delivery of this item" whenever is negative (we can put, as you did, also number of negative items).
    This part is easy so far.

    Please Login or Register  to view this content.
    Result

    Please Login or Register  to view this content.

  14. #14
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    Yes you are right. Thanks for the good tip.

    Code updated-

    Please Login or Register  to view this content.

  15. #15
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    Now go for each item
    Please Login or Register  to view this content.
    check is it > 0 so it can give item to other stores
    Please Login or Register  to view this content.
    Then start loop from the start to check wich stores need item
    Please Login or Register  to view this content.
    and check again is some of item remain from previous adding
    Please Login or Register  to view this content.
    if current cell is still negative
    Please Login or Register  to view this content.
    Add items to the negative store
    Remove items from positive store
    and transfer rest for other stores (if has any)
    Please Login or Register  to view this content.
    Add that store to transfering stores (i.e. Transfer this item to: Shop 1, Shop 2)
    Please Login or Register  to view this content.
    And now delete that third column with values.

  16. #16
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    Ohh, I got that know. Thanks for the explanation. I used a slightly different approach though. I did the addition and subtraction in the rough table. Although now it seems to me that bringing data in vertical form first would have been a better idea!

    Thanks for the explanation again!!

  17. #17
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    I thought to do that first.
    (If you look at mine code you'll see I'm usign ws1 and ws3. ws2 was for that table )

    But at the end I figure out I can go without it.

    There is also one thing to consider that:
    Transfer this item to: Shop 1, Shop 2
    Doesn't say how much items going where.

    I've fix it into:

    Transfer item(s): 3 to Shop 1, 1 to Shop 2, 1 to Shop 3

  18. #18
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    This is output result:

    Please Login or Register  to view this content.

  19. #19
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to create store by store inventory transfers

    Ohh yes, I forgot that thing. My code would though return Shop 1 twice with a comma.
    Item count is not actually possible with my approach

  20. #20
    Registered User
    Join Date
    03-15-2016
    Location
    Melbourne
    MS-Off Ver
    XP
    Posts
    6

    Re: Formula to create store by store inventory transfers

    Wow....I am totally blown away by your brilliance. This was a perfect solution - I am so grateful to you both for taking the time and showing such professionalism in helping me resolve this issue.

    Wishing you both well.

    Warm regards,

    Damian

  21. #21
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula to create store by store inventory transfers

    Hope to see you again

    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. 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
  2. [SOLVED] Dynamic Changing Data, Based on Criteria Store in Array, Sum array and store in Cell
    By penbeacho in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-28-2015, 10:31 AM
  3. Replies: 5
    Last Post: 04-30-2014, 05:46 PM
  4. Replies: 0
    Last Post: 04-29-2014, 01:01 PM
  5. need to develop Excel sheet for Store Inventory Activities
    By shrikantborkar in forum Excel General
    Replies: 2
    Last Post: 02-06-2014, 11:59 AM
  6. 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
  7. Why am I losing macros that I create and store in PERSONAL.XLS?
    By Frustrated in Vegas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2005, 02:06 PM

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