+ Reply to Thread
Results 1 to 16 of 16

Track movement stock by copy amounts from previous row to next row.

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Track movement stock by copy amounts from previous row to next row.

    Hi experts
    the result should be in FINAL sheet from row7 based on cell A2 should match with column B for each sheet then should brings data:
    1-in column A will show sheet name and brings data for old date .
    2- in column B will brings INVOICE.N from each sheet is existed in column C based on adjacant cell contains sheet name in column A
    3- in column C will brings DATE from each sheet is existed in column A based on adjacant cell contains sheet name in column A for FINAL sheet.
    2- in column D will brings CUSTOMER from each sheet is existed in column D based on adjacant cell contains sheet name in column A .
    4- in column E in row8 will brings QTY from STOCK sheet in Column (C) .
    5-in column F in row2 will brings UNIT PRICE from STOCK sheet in Column (D) .
    6- in column(G) will brings QTY from each sheet in column(E) based on adjacant cell contains sheet name in column A for FINAL sheet .
    7- in column(H) will brings UNIT PRICE from each sheet in column(F) based on adjacant cell contains sheet name in column A for FINAL sheet .
    8- in column(I) will calculation QTY based on sheet name , if sheet name in column A for FINAL sheet is
    PURCHASES then the I=E +G
    if sheet name in column A for FINAL sheet is
    SALS then the I=E - G, if sheet name in column A for FINAL sheet is PURCHASES RETURNS then the I=E - G , if sheet name in column A for FINAL sheet is
    SALES RETURNS then the I=E +G
    9-column(J) should be the same column(H)
    next row(8) depends on row7 then will move numric valus from row7 to row 8
    in column( I ) in row7 will copy to column( E )for row8,
    in column( H ) in row7 will copy to column( F )for row8,
    in columns( G,H) will brings QTY,PRICE from sheet name is mathed with column A for row8,
    in column( I ) will calculation QTY for row8(CHECK POINT 8) .
    in column( J ) for row8 (check point9)
    Attached Files Attached Files
    Last edited by abdo meghari; 03-29-2024 at 02:26 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    There are inconsistencies betweeh dates in the individual sheets and those in FINAL: DD/MM/YYYY are changed to mm/dd/yyyy

    Please Login or Register  to view this content.
    This uses a (hidden) sheet "TEMP": do NOT delete
    Attached Files Attached Files
    Last edited by JohnTopley; 03-29-2024 at 01:58 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    Hi John again ,
    There are inconsistencies betweeh dates in the individual sheets and those in FINAL: DD/MM/YYYY are changed to mm/dd/yyyy
    sorry about it.

    where did you get value 20 in PREVIOUS QTY column from ?!
    also value 100 in QTY column as in picture 1?!
    it should be 200 as in picture 2 in PREVIOUS QTY when brings from STOCK sheet ,500 as I in picture 3 when brings from PURCHASES sheet .
    did you calculate across sheets for the same date or..?
    if it's so it doesn't what I want .
    every date for each sheet alone should show as I did it in OP .
    Attached Images Attached Images
    Last edited by abdo meghari; 03-29-2024 at 10:31 PM.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    Look CAREFULLY at the brand

    BS 1200R24 G580 JAP not BS 1200R20 G580 JAP
    Last edited by JohnTopley; 03-30-2024 at 04:00 AM.

  5. #5
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    OMG !
    works perfectly , but I have question about Temp sheet, what does do this sheet?
    is it necessary ?
    and can avoid error when A2 is empty or error brand? .should clear data from row 7 if A2 is empty or error brand.
    Last edited by abdo meghari; 03-30-2024 at 05:06 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    The macro uses Advanced Filter (very good for performance) to extract data from each sheet and puts the extracted data into TEMP. You need the data collected too ensure it is in data order

    So TEMp is need (and can be hidden): if you do not like the solution, then hope that someone else provides one ( Scripting Dictionary? )as I am not going to spend any more time on this.

    And I can put an "error trap" when A2 is blank but why would you run the macro if it is blank?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-31-2024 at 02:49 AM.

  7. #7
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    it will show variable not defined in this
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    See attached with updated code.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-31-2024 at 02:49 AM.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    Please Login or Register  to view this content.

    Please try the attached which removes need for "Temp" sheet
    Attached Files Attached Files
    Last edited by JohnTopley; 03-31-2024 at 03:05 PM.

  10. #10
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    I appreciated for your help me.
    Do me favor,please?
    I would sort data from old date to last date and if there is the old date for all of sheet then will be like this
    PURCHASES
    PURCHASES RETURNS
    SALES
    SALES RETURNS
    thanks

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    It currently sorts oldest to latest date
    Last edited by JohnTopley; 04-01-2024 at 05:19 PM.

  12. #12
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    You deleted your last attaching !
    it should sorts oldest to latest date as priority
    example :
    22/01/2024 PURCHASES
    22/02/2024 PURCHASES RETURNS
    02/02/2024 SALES
    24/01/2024 SALES RETURNS
    the result after sort like this

    22/01/2024 PURCHASES
    24/01/2024 SALES RETURNS
    02/02/2024 SALES
    22/02/2024 PURCHASES RETURNS
    and if the same date like this
    10/01/2024 PURCHASES
    10/01/2024 SALES RETURNS
    10/01/2024 SALES
    10/01/2024 PURCHASES RETURNS
    the result will be
    10/01/2024 PURCHASES
    10/01/2024 PURCHASES RETURNS
    10/01/2024 SALES
    10/01/2024 SALES RETURNS
    another example
    11/01/2024 PURCHASES
    10/01/2024 SALES RETURNS
    10/01/2024 SALES
    12/01/2024 PURCHASES RETURNS
    the result will be


    10/01/2024 SALES
    10/01/2024 SALES RETURNS
    11/01/2024 PURCHASES
    12/01/2024 PURCHASES RETURNS

    another example
    11/01/2024 PURCHASES
    10/01/2024 SALES RETURNS
    11/01/2024 SALES
    11/01/2024 PURCHASES RETURNS
    the result will be
    10/01/2024 SALES RETURNS
    11/01/2024 PURCHASES
    11/01/2024 PURCHASES RETURNS
    11/01/2024 SALES

    if there is the same date when the date is old the priority will be
    PURCHASES
    PURCHASES RETURNS
    SALES
    SALES RETURNS

    when there is the same date when the date is old PURCHASE will precede PURCHASES RETURNS , SALES precede SALES RETURNS.
    if it can't sort like this way forget that.

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    A sample (I manipulated the dates purely to show an example): is this what is required?

    If so, post a workbook with a real example, so I can test it with actual data.

    Try with attached:
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by JohnTopley; 04-02-2024 at 07:26 AM.

  14. #14
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    can you fix this error object doesn't support this property or method until to test your new version ?
    Please Login or Register  to view this content.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Track movement stock by copy amounts from previous row to next row.

    See attached:
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: Track movement stock by copy amounts from previous row to next row.

    it's excellent !
    many thanks for your time & assistance.

+ 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 track stock movement on a monthly basis through Pivot table
    By rachelexcel1 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-28-2019, 11:05 PM
  2. Replies: 4
    Last Post: 11-19-2018, 10:48 PM
  3. STOCK MOVEMENT day to day
    By makinmomb in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2014, 12:34 PM
  4. Replies: 0
    Last Post: 10-28-2012, 07:22 AM
  5. using excel to track movement of goods
    By Jas1985 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-21-2010, 05:04 PM
  6. [SOLVED] How do I get a hyperlink to track data movement?
    By Kev Nurse in forum Excel General
    Replies: 1
    Last Post: 02-02-2005, 08:22 PM
  7. [SOLVED] How do I get a hyperlink to track data movement?
    By Kev Nurse in forum Excel General
    Replies: 1
    Last Post: 02-02-2005, 07: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