+ Reply to Thread
Results 1 to 8 of 8

VB Code to calculate amount from transfer of inventory

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to calculate amount from transfer of inventory

    Hello:

    Please refer to attached file.
    I have data as shown.
    This data shows inventory transfer from one store to another.
    Column B and C are Store name.
    Column G is Qty transfer and column H is Unot cost and Column I is total cost.

    I need VB Code to do following

    I need to create Invoice for each store for what they owe to each other.
    My logic here is as below.

    1st sort out the data for same 2 stores transfer (from and to, To and From).

    Example
    Row#2 and 3 shows Transfer from BN to WE (Cost is $6 and $14.40 = $20.40)
    Now look for any transfer from WE to BN
    Row#25 and #27 shows transfer from WE to BN (Cost is $21.60 and $42 = $63.60).

    So now i would need output in sheet2 as shown

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to calculate amount from transfer of inventory

    Hello:

    Please refer to attached file.

    I have shown the output needed as shown in sheet3 Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to calculate amount from transfer of inventory

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to calculate amount from transfer of inventory

    Hello Karedog:

    Great Job, Thanks but i am seeing small issue.
    Let me explain.
    Inventory is transfered FROM and TO stores
    So inventory moving FROM store gets $$ from TO Store

    So refer to Sheet4 which was created by your code.
    Here look at the data in Row 10 & 11
    In this case 2 item # inventory is moved from EL to WE, totalling $15
    SO in this case WE needs to pay EL as i have highlighted.

    Go down to data from row 24 down.
    Here Row# 26 thru 36 : Inventory is moved from LJ to WE totalling $106.
    Now Row#37 shows : Inventory moved from WE to LJ totalling $6.
    So in this case, WE will pay $100

    Go down Row 58
    Inventory moved FROM SO to CW, so CW to pay SO $3.00 and so on.


    SO now once this is done, if code can be modified to give me summary as shown in column L thru O.

    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to calculate amount from transfer of inventory

    Hi Riz,

    So you mean, you always want a positive number for total ?
    Then use this modified code :

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to calculate amount from transfer of inventory

    Hello karedog:

    Seems like you got it.

    SO now once this is done, if code can be modified to give me summary as shown in column L thru O.

    Please refer to sheet5 of attached sheet.

    Riz
    Attached Files Attached Files

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to calculate amount from transfer of inventory

    Should be :
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to calculate amount from transfer of inventory

    Hello Karedog:

    Thanks a lot...this will work

    R

+ 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. Formula to calculate Amount Paid and Amount Past Due
    By TinaAlldredge in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-11-2016, 09:19 AM
  2. [SOLVED] Calculate Projected Annual amount from Dollar value (Amount) and varying time intervals
    By old dawg in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-16-2016, 07:29 PM
  3. Replies: 2
    Last Post: 11-21-2014, 09:35 AM
  4. [SOLVED] Duplicate inventory items, need total on quantity and amount
    By Glendaann in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-03-2013, 04:08 PM
  5. [SOLVED] Calculate dollar amount paid if between a to and from amount
    By oxicottin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-21-2012, 08:01 PM
  6. How can I calculate amount of time left based on amount spent?
    By KLD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2006, 11:25 AM
  7. [SOLVED] How do I calculate Amount of Sales Tax from Total Amount?
    By MikeS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2005, 04:06 PM

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